Nested comments in VAX C -- Help!

Sven Heinicke sven at cs.widener.edu
Wed May 8 03:02:41 AEST 1991


In <VHG+SRC at cs.widener.edu>, brendan at cs.widener.edu writes:
>In <114836 at cc.utah.edu>, RCAPENER at cc.utah.edu writes:
>>if you try  /* outside comment /* inside comment */ */
>>the compiler throws up!
>
> As it should .. no compiler should let that through.
> When you "nest" comments, you have multiple starts (/*); the */
>sequence tells cpp that it's the end of the comment, and it should
>start paying attention again. The second */ is what it's throwing up on.
>

it is bad, I do a string-replace from */ to ^/ and string-replace it
back afterwards.

-- 
sven at cs.widener.edu                                  Widener CS system manager
Sven Mike Heinicke                                          and Student
(pssmheinicke at cyber.widener.edu (if you must))



More information about the Comp.lang.c mailing list