This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Correct __GNUC_PREREQ for __const__ and __noreturn__ attributes.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Kang-Che Sung <explorer09 at gmail dot com>, <libc-alpha at sourceware dot org>
- Date: Wed, 22 Mar 2017 17:32:16 +0000
- Subject: Re: [PATCH] Correct __GNUC_PREREQ for __const__ and __noreturn__ attributes.
- Authentication-results: sourceware.org; auth=none
- References: <20170320175239.5982-1-explorer09@gmail.com> <97a92d62-362e-43fa-3df5-4fd3da78e2a7@cs.ucla.edu>
On Tue, 21 Mar 2017, Paul Eggert wrote:
> For what it's worth, Gnulib code uses __attribute__ ((__noreturn__)) for GCC
> 2.8 and later, and __attribute__ ((__const__)) for GCC 2.95 and later. I
> vaguely recall problems using these attributes in earlier GCC versions, though
> I'm afraid I don't remember the details. Perhaps Glibc wouldn't run into the
> problems, whatever they were.
I think the 2.8 conditional may be in order to support it at the start of
a function declaration (before the return type), i.e. compatibly with
_Noreturn.
--
Joseph S. Myers
joseph@codesourcery.com