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: Fix implicit-fallthrough warnings in tst-setjmp.c


On Thu, 14 Feb 2019, Paul Eggert wrote:

> On 2/14/19 2:23 PM, Joseph Myers wrote:
> > > Shouldn't we use the more-standard _Noreturn for this sort of thing?
> > > cdefs.h
> > > defines _Noreturn for pre-C11 GCCs.
> > The attribute seems much more widely used in glibc .c files at present.
> 
> Sure, but that habit predates C11. Now that we have a standard way to say
> "this function does not return" it's surely better to use the standard way, at
> least for new code and arguably even for old code.

The consistent, universal style in glibc, for all files not coming from 
external sources, other than a single use of _Noreturn in 
nptl/thrd_exit.c, is to use the attribute.  You can of course propose 
(with corresponding patch) a change to the style used (recalling that for 
installed headers _Noreturn would reduce portability because of prefix 
attributes not working with GCC 2.7), but it seems clear my patch is 
consistent with the current style and _Noreturn would be inconsistent with 
it.

-- 
Joseph S. Myers
joseph@codesourcery.com


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