Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!ALDERAAN.SCRC.SYMBOLICS.COM!Ed From: Ed@ALDERAAN.SCRC.SYMBOLICS.COM (Ed Schwalenberg) Newsgroups: gnu.gcc.bug Subject: Behavior of normal gcc vs. `-traditional' Message-ID: <19881013144144.1.ED@BLACK-BIRD.SCRC.Symbolics.COM> Date: 13 Oct 88 14:41:00 GMT References: <8810130911.AA00180@mahendo.Jpl.Nasa.Gov> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 23 Date: Thu, 13 Oct 88 02:11:22 PDT From: Greg Earle ... /usr/include/suntool/panel.h:35: warning: garbage at end of #ifdef argument ... gcc also seems to not like non-alphanumeric (i.e., `.' - the include file has an `#ifdef ecd.color' in it, causing the gcc-cpp diagnostics above) ... So, why does `normal' (i.e., `non-traditional' (^: ) gcc complain about these lines?? ... Are non-alphanumeric characters in `#ifdef' statements also illegal? (I note that adding `-ansi' has no effect on the diagnostics) Even K&R describes the token after an #ifdef as an identifier, meaning it may use only the characters A-Z, a-Z, and _. Various compilers will do various horrible things in this situation; the gcc cpp is the only one I know of which will give a reasonable, understandable error message instead of making a random assumption and quietly screwing the user. In short, the author of the code in question needs to change his .'s into _'s, after checking that "ecd_color" doesn't already mean something else.