builtin-noret-1.c (_exit, _Exit): Make weak.

* gcc.dg/torture/builtin-noret-1.c (_exit, _Exit): Make weak.
	* gcc.dg/torture/builtin-noret-2.c (_exit, _Exit): Likewise.

From-SVN: r67387
This commit is contained in:
Joern Rennecke 2003-06-03 18:00:23 +01:00
parent ae74ed1fc5
commit bf46042bdb
2 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,11 @@ extern void t_Exit (void);
extern void link_failure (void);
/* Some libcs have _exit and/or _Exit, and won't allow it to be re-defined,
so make it weak. */
#pragma weak _exit
#pragma weak _Exit
int
main (void)
{

View File

@ -46,11 +46,17 @@ void
t_exit (void)
{
extern void _exit (int);
/* Some non-Unix libcs have _exit, and won't allow it to be re-defined,
so make it weak. */
#pragma weak _exit
_exit (1);
link_failure ();
}
/* Some non-Unix libcs might not have _exit. */
/* Some non-Unix libcs have _exit, and won't allow it to be re-defined,
so make it weak. */
#pragma weak _exit
void
_exit (int i)
{
@ -61,11 +67,17 @@ void
t_Exit (void)
{
extern void _Exit (int);
/* Some libcs have _Exit, and won't allow it to be re-defined,
so make it weak. */
#pragma weak _Exit
_Exit (1);
link_failure ();
}
/* Some libcs might not have _Exit. */
/* Some libcs have _Exit, and won't allow it to be re-defined,
so make it weak. */
#pragma weak _Exit
void
_Exit (int i)
{