This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc/obstack: Merge obstack code back from gnulib
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Will Newton <will dot newton at linaro dot org>, <libc-alpha at sourceware dot org>
- Date: Fri, 28 Mar 2014 21:11:15 +0000
- Subject: Re: [PATCH] malloc/obstack: Merge obstack code back from gnulib
- Authentication-results: sourceware.org; auth=none
- References: <1396004022-30929-1-git-send-email-will dot newton at linaro dot org> <5335C826 dot 4080201 at cs dot ucla dot edu>
On Fri, 28 Mar 2014, Paul Eggert wrote:
> On 03/28/2014 03:53 AM, Will Newton wrote:
> > The only change made was to replace _Noreturn with __attribute__
> > ((__noreturn__)).
>
> It's better to keep the sources identical when possible. Gnulib uses
> _Noreturn with the C11 meaning, and libc should move in that direction too.
> Attached is a revised patch to get the ball rolling on that.
I don't think we should #define _Noreturn in the case of GCC >= 4.7, when
it's supported by GCC inside and outside C11 mode.
If we move to using _Noreturn (directly or indirectly via some other
macro) in installed headers - logically right for supporting generic C11
compilers, although I don't think many people are likely to be using the
headers with compilers that don't define __GNUC__ - then there are the
issues described in
<https://sourceware.org/ml/libc-alpha/2012-01/msg00084.html> with where it
can be placed in header declarations without either breaking use of the
headers with GCC 2.7 or causing such use to lose the information that
functions don't return.
--
Joseph S. Myers
joseph@codesourcery.com