This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in gcc
- To: Mo McKinlay <mmckinlay at gnu dot org>
- Subject: Re: Bug in gcc
- From: Nilmoni Deb <ndeb at ece dot cmu dot edu>
- Date: Fri, 25 Aug 2000 20:19:45 -0400 (EDT)
- cc: bug-gcc at gnu dot org
On Sat, 26 Aug 2000, Mo McKinlay wrote:
>
> > Hi,
> > I noticed this bug in gcc of versions 2.95.1, 2.7.2.3, 2.8.1, and
> > egcs-2.91.66.
> >
> > If I have a two statements in a header file as follows:
> >
> > int NOM_CURVATURE = 35;
> > #define NOM_CURVATURE 35
> >
> >
> > the gcc compiler accepts this !!
>
> It should. There's nothing wrong with those statements, provided they
> appear in that order. The only problems would arise if you did:
>
> NOM_CURVATURE = 36;
>
> At which point the preprocessor would turn it into:
>
> 35 = 36;
>
> Which is obviously a syntax error.
I tried exactly that:
int NOM_CURVATURE = 35;
#define NOM_CURVATURE 36
and it is still not giving an error.
Program execution shows the value of NOM_CURVATURE as 36.
thanks
- Nil
>
> --
> Mo McKinlay Chief Software Architect inter/open Labs
> -------------------------------------------------------------------------
> GnuPG Key: pub 1024D/76A275F9 2000-07-22 Mo McKinlay <mmckinlay@gnu.org>
>
>
>
>
>
>
>