This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Add a few noreturn keywords


On Tue, Jan 10, 2012 at 06:31, Marek Polacek <polacek@redhat.com> wrote:
> However, when I added the
> noreturn attribute to __pthread_exit in pthreadP.h, GCC started to
> complain:
> 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
> aliases.

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
change.


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