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: bad generation of stabs under i386-coff with -O2 -finline-functions


>>>>> "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


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