Path: utzoo!attcan!uunet!edsews!teemc!rphroy!tkacik From: tkacik@rphroy.uucp (Tom Tkacik) Newsgroups: comp.std.c Subject: Re: warning: '/*' within comment Message-ID: <25176@rphroy.UUCP> Date: 11 Jun 90 18:36:22 GMT References: <1990Jun1.200433.6919@druid.uucp> <16786@haddock.ima.isc.com> <371@necssd.NEC.COM> <1774@tkou02.enet.dec.com> <1990Jun8.224827.23783@diku.dk> <1777@tkou02.enet.dec.com> Sender: news@rphroy.UUCP Reply-To: tkacik@rphroy.uucp (Tom Tkacik) Organization: GM Research, Warren, Mi Lines: 26 In article <1777@tkou02.enet.dec.com>, diamond@tkou02.enet.dec.com (diamond@tkovoa) writes: |> What's the problem? |> #include |> #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 ] |> 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