warning: '/*' within comment
Tom Tkacik
tkacik at rphroy.uucp
Tue Jun 12 04:36:22 AEST 1990
In article <1777 at tkou02.enet.dec.com>, diamond at tkou02.enet.dec.com
(diamond at tkovoa) 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.
--
Tom Tkacik GM Research Labs, Warren MI 48090
Work phone: (313)986-1442 uunet!edsews!rphroy!megatron!tkacik
"I'm president of the United States, and I'm not going to eat anymore
broccoli."
--- George Bush
More information about the Comp.std.c
mailing list