Path: utzoo!telly!ddsw1!mcdchg!chinet!att!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: gnu.gcc.bug Subject: Re: Problem Compiling Certain Bad C Code Message-ID: <10627@ulysses.homer.nj.att.com> Date: 22 Sep 88 00:25:42 GMT References: <8809201612.AA10674@s2.Morgan.COM> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Distribution: gnu Organization: AT&T Bell Laboratories Lines: 15 In article <8809201612.AA10674@s2.Morgan.COM> frank@morgan.com writes: >GCC will report an unterminated character constant in the code >fragment above, regardless of whether or not COMMENT is defined. This actually comes from cpp, not gcc. The reason is that gcc (and its cpp) are ANSI C by default, which means that cpp has to tokenize to correctly behave as an ANSI C cpp. In other words, it has to parse the text being #ifdef'ed out. If you use the -traditional flag, this code will compile OK. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com