This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Non-constant initializer problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]