gcc shared library init problem (2nd try)

Neil Booth NeilB@earthling.net
Wed Jul 5 07:19:00 GMT 2000


Thanks for your bug report.

Ralf Fassel wrote:-

> struct s foo1 = {oneone};
> struct s foo2 = {twotwo};

twotwo is not a constant here, but a variable.  I imagine the author
of the code is thinking the linker should assign it before main() at
runtime.  I tend to think the compiler should give an error, or at
least a warning, by my (feeble) understanding of the C standard.

Neil.


More information about the Gcc-bugs mailing list