bad generation of stabs under i386-coff with -O2 -finline-functions

Mark Mitchell mark@markmitchell.com
Tue Oct 13 11:54:00 GMT 1998


>>>>> "Marc" == Marc Espie <Marc.Espie@liafa.jussieu.fr> writes:

    Marc> On Tue, Oct 13, 1998 at 09:07:52AM -0700, Mark Mitchell
    Marc> wrote:
    >>  Consider the following code: // a.C static struct object {
    >> object() { exit(0); } } o;
    >> 
    >> // b.C int main() { abort(); }
    >> 
    >> 
    >> By the way, this code isn't portable anyways.  There's nothing
    >> in the standard that says `o' has to be initialized before the
    >> first call to a function in `a.o'.

    Marc> Erm... I hope you mean b.o, right ?

Yup.

    Marc> Okay, I'll admit to having cut corners a bit too short... Is
    Marc> that one still not portable, or does it fit the bill better
    Marc> ?

Yup again.  I didn't mean to imply that there wasn't a bug; the GNU
linker tries to accomplish all initialization before main (except for
shared libraries, of course).

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com



More information about the Gcc-bugs mailing list