From: Dan DOT Pop AT cern DOT ch (Dan Pop) Newsgroups: comp.os.msdos.djgpp,comp.lang.c Subject: Re: GCC bug (semi OT on clc) Date: 30 Oct 2001 17:49:03 GMT Organization: CERN European Lab for Particle Physics Lines: 38 Message-ID: <9rmp6f$pbt$1@sunnews.cern.ch> References: <3BDD9BC7 DOT E51EA7C8 AT yahoo DOT com> NNTP-Posting-Host: ues5.cern.ch X-Trace: sunnews.cern.ch 1004464143 25981 (None) 137.138.32.79 X-Complaints-To: news AT sunnews DOT cern DOT ch X-Newsreader: NN version 6.5.0 #18 (NOV) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In kaz AT ashi DOT footprints DOT net (Kaz Kylheku) writes: >In article <3BDD9BC7 DOT E51EA7C8 AT yahoo DOT com>, CBFalconer wrote: >>Under DJGPP, when compiling cokus.c from: >> >> http://www.math.keio.ac.jp/~matumoto/cokus.c >> >>we get the following: >> >>> [1] c:\dnld\scratch>gcc -v cokus.c >>> Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs >>> gcc version 2.95.3 20010315/djgpp (release) >>> c:/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c -std=c89 -v -D__GNUC__=2 -D__ > ^^^^^^^^^^^^^^^^^ >This is the issue with your installation. I can reproduce the error messages >with a normal installation of gcc 2.95.2 if I specify -ansi, or if I >specify the above, or -std=c89 by itself. > >The C89 language does not have // comments, so if the compiler conforms >to C89, it must not recognize them. > >In its default mode on normal installations, GCC does recognize them as >an extension; the programmer must explicitly demand conformance. > >Next time, take it to a GCC newsgroup. Maybe he wanted to know if he had a bug to report in the first place. As it turned out, he hadn't, so posting to c.l.c was the right thing. Putting gcc in conforming C89 mode when compiling code downloaded from the net is a form of shooting yourself in the foot. Dan -- Dan Pop CERN, IT Division Email: Dan DOT Pop AT cern DOT ch Mail: CERN - IT, Bat. 31 1-014, CH-1211 Geneve 23, Switzerland