libc_hidden_proto vs __attribute__
Roland McGrath
roland@frob.com
Sat Aug 3 21:09:00 GMT 2002
It appears to be `_exit' in particular that is loused up.
Probably because GCC thinks it knows about _exit before it's told.
This test gets the warning, but with -D_exit=loser, it does not.
extern void _exit (int __status) __attribute__ ((__noreturn__));
__typeof (_exit) __GI__exit; __typeof (_exit) _exit __asm__ (""
"__GI__exit") __attribute__ ((visibility ("hidden")));
extern void bar (void) __attribute__ ((noreturn));
void
bar (void)
{
_exit (0);
}
More information about the Libc-hacker
mailing list