This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Patch: Run init tests only when __cxa_atexit is supported.


> I agree with Andrew that, in theory, XFAILing these tests would be
> better.  If it's easy to do a conditional XFAIL that would be better.
> Otherwise, this version is fine -- the only downside is that if we
> somehow fix this bug without using __cxa_atexit, these tests still won't
> be run.
> 
> Thanks,
> 
> -- 
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713

I can xfail them with:

// { dg-do run { xfail { ! { dg-require-cxa-atexit } } } }

The only problem with this is that it doesn't allow me to paper over the
other problem with init18.C, namely that it calls _Exit.  HP-UX doesn't
have _Exit(), which is a C99 routine, and not a C++ routine.

I could call _exit(), but if I do that, can I put in a declaration for
_exit() in the test?  I am worried that some platforms might have a
declaration for _exit() in stdlib.h and might complain about duplicate
definitions.  I could remove the include of stdlib.h and do explicit
declarations for exit, _exit, and abort....

Any suggestions for handling _Exit()?

Steve Ellcey
sje@cup.hp.com


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