This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc bug? or how can I learn to get rid of '#define' and love'const'?
- To: lxl at my-deja dot com
- Subject: Re: gcc bug? or how can I learn to get rid of '#define' and love'const'?
- From: llewelly at 198 dot dsl dot xmission dot com
- Date: Tue, 1 Feb 2000 00:13:04 -0700 (MST)
- cc: gnu-gcc-bug at moderators dot isc dot org
On Tue, 1 Feb 2000 lxl@my-deja.com wrote:
> I have a very simple helloworld to try global constants:
>
> ////////////// start of code //////////////
>
> //
> // const.c
> //
> // test const globals
>
> #include <stdio.h>
>
> const int firstglobalint = 100;
> const int secondglobalint = firstglobalint;
>
> int
> main()
> {
> const int firstlocalint = 100;
> const int secondlocalint = firstlocalint;
>
> printf("hello world with 1st %d and 2nd %d!\n", firstlocalint,
> secondlocalint);
>
> return 0;
> }
>
> //////////////// end of code ////////////////
>
[snip]
2.95.2 compiles this fine. Upgrade early, upgrade often.