warning: '/*' within comment
diamond@tkovoa
diamond at tkou02.enet.dec.com
Thu Jun 7 11:05:13 AEST 1990
In article <371 at necssd.NEC.COM> harrison at necssd.NEC.COM (Mark Harrison) writes:
>In article <16786 at haddock.ima.isc.com>, karl at haddock.ima.isc.com
(Karl Heuer) writes:
>>More generally, `#if 0...#endif' should not be considered a `comment', except
>>in the sense of `commenting out code'. The contents are still lexed into C
Should be: The contents MIGHT still be lexed into PREPROCESSOR
>>tokens, which is why it's also illegal to say
>> #if 0
>> The compiler won't like this
Should be: SOME perfectly valid compilers won't like this
>> #endif
>Are you sure about this? I tried your example, and it both compiled and
>linted.
Your compiler is lazy, legally (i.e. just being efficient, unless you asked
for extra checking). Your lint is broken. Get a refund for your lint.
>If this is true, then the following should also not work:
>#if MICROSOFT
>extern far char * x; /* however it's done */
>#endif
No, because "far" is a valid preprocessor token. The compiler can't
know if you also if'ed out something legal like "#define far unsigned".
>#if VMS
>extern char * x$something; /* however it's done */
>#endif
Yes, compilers can legally complain about this.
--
Norman Diamond, Nihon DEC diamond at tkou02.enet.dec.com
Proposed group comp.networks.load-reduction: send your "yes" vote to /dev/null.
More information about the Comp.std.c
mailing list