Mail Archives: djgpp/2001/10/30/13:22:07
In <DPiD7.130760$ob DOT 2914531 AT news1 DOT rdc1 DOT bc DOT home 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.
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
- Raw text -