This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add a few noreturn keywords
On Tue, Jan 10, 2012 at 06:31, Marek Polacek <firstname.lastname@example.org> wrote:
> However, when I added the
> noreturn attribute to __pthread_exit in pthreadP.h, GCC started to
> forward.c:164:1: warning: ânoreturnâ function does return
Look at the patch I checked in. That should fix the issue but since I
don't use 4.7 I cannot verify.
> And wrt *longjmp*, all prototypes
> are marked as noreturn already; it may be that GCC is confused by the
I don't know where you see a problem. Run the code through the
preprocessor and look at all the relevant pieces.
> BTW, wouldn't it be better to define `attribute_noreturn' which could
> under C11 expand to _Noreturn keyword, otherwise to
> __attribute__ ((noreturn))? ÂThanks,
Completely irrelevant for all the internal prototypes. gcc will
always be required.
For the ones in installed headers I see a problem with the placement.
Unless all gcc versions are guaranteed to allow the attribute to be
added in the same place as _Noreturn is required there will be no