From: gah AT ugcs DOT caltech DOT edu (glen herrmannsfeldt) Newsgroups: comp.os.msdos.djgpp,comp.lang.c Subject: Re: GCC bug (semi OT on clc) Date: 30 Oct 2001 00:22:04 GMT Organization: California Institute of Technology, Pasadena Lines: 34 Message-ID: <9rkrrc$pon@gap.cco.caltech.edu> References: <3BDD9BC7 DOT E51EA7C8 AT yahoo DOT com> NNTP-Posting-Host: yak.ugcs.caltech.edu X-Newsreader: NN version 6.5.0 #1 (NOV) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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. But it was a C problem and not a GCC problem. He was using non-C comments, and gcc was appropriately not recognizing them. -- glen