🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1685

Re: Problem Compiling Certain Bad C Code

#1685
From: Eduardo Krell
Date: Thu, 22 Sep 1988 00:25
15 lines
1134 bytes
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
Technical Details
Message-ID: <10627@ulysses.homer.nj.att.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!chinet!att!ulysses!hector!ekrell
References: <8809201612.AA10674@s2.Morgan.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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