Re: program crashes on startup when compiled with 'recent' gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zdeněk Sojka <zsojka@xxxxxxxxx> writes:

> The following code crashes during initialization of globals. Has to
> be compiled by "recent" gcc snapshot - this problem first appeared
> sometimes between 20090611 and 20090618.

I was not able to recreate this problem with the current sources.

> It should be valid C++ with defined behaviour, but I am not sure
> about that, so I am asking here instead of opening bug report.

It looks valid to me.

> (note that simple "static int i; return i;" doesn't have defined
> behaviour for non-primitive types (afaik))

I think that should normally be valid too--static variables are always
initialized to zero bits.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux