From: davidsen@ariel.crd.GE.COM (william E Davidsen) Subject: Possible gotcha in gcc Date: Wed, 14 Apr 1993 13:01:10 GMT
I noted an interesting behavior in gcc last night, it doesn't ignore
stuff which is #ifdef'd out! I got a program to port to Linux, and I had
some text included which I found valuable. Having learned long ago that
putting /*...*/ around arbitrary stuff might be a problem due to */ in
the text, I put #if 0 ... #endif around it instead. A gcc generated
error messages about the text it should have been ignoring!
Obviously the preprocessor has to scan for #commands, but it shouldn't
be complaining about other things in the text, like over-long strings,
etc. This *may* be an enhancement of the Linux version, since the
V.4/386 and Sun versions of gcc don't complain about the problem.
Therefore I want to check it carefully before I report it to the
developers as a generic bug in gcc.
Just a warning to jiggle your memory if you ever have something
similar happen.
-- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345