This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Non-constant initializer problem
- To: Jørgen Steensgaard <jsm at it dot dtu dot dk>
- Subject: Re: Non-constant initializer problem
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Wed, 08 Sep 1999 10:38:22 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <37D628E8.C231783C@it.dtu.dk>
- Reply-To: nathan at compsci dot bristol dot ac dot uk
Jxrgen Steensgaard wrote:
>
> Compiling the following `program'
>
> #include <stdio.h>
>
> FILE *bug = {stdout};
>
> It looks as if an earlier accepted construct has been deemed
> unacceptable.
Not necessarily, are you running the same OS version in both cases?
Linux 2.0.x had stdout as a constant expr, this changed in Linux 2.2.x
where it became non-constant (as the standard permits).
> If this is the case, and thus not a bug, what is the rationale? Use of
> non-constant initializers is described as a gcc extension in the
> info-files.
Only inside a function, not at file scope.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk