This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Run init tests only when __cxa_atexit is supported.
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: mark at codesourcery dot com, pinskia at physics dot uc dot edu
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 May 2006 16:47:56 -0700 (PDT)
- Subject: 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