www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/30/13:22:07

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> <DPiD7.130760$ob DOT 2914531 AT news1 DOT rdc1 DOT bc DOT home 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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019