warning: '/*' within comment
diamond@tkovoa
diamond at tkou02.enet.dec.com
Thu Jun 14 15:12:35 AEST 1990
The original poster of this topic has already changed the example
twice, but let's wrap up this tangent.
In article <25176 at rphroy.UUCP> tkacik at rphroy.uucp (Tom Tkacik) writes:
||| What's the problem?
||| #include <stdio.h>
||| #if 0
||| C's weird#if 1 /* isn't it */
||| #else
||| int main(int c, char *v[]) { printf("Hello, world!\n"); return 0; }
||| #endif
||| preprocesses to
||| [contents of <stdio.h>]
||| int main(int c, char *v[]) { printf("Hello, world!\n"); return 0; }
||| regardless of whether the preprocessor really tokenizes or not the line
||| C's weird#if 1 /* isn't it */
>
>The problem is the C's. If the preprocessor tokenizes, it will think that
>the 's is the start of 's'. It may issue an error about a missing
>closing quote. Even though the text is ignored, this must be analyzed.
Huh?
||| C's weird#if 1 /* isn't it */
' '
it has opening and closing 's.
The VALUE of a character constant containing more than one character is
implemenation defined, but its syntactic effect is not. It is a character
constant. (And it is #if'ed out.)
--
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