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] Correct __GNUC_PREREQ for __const__ and __noreturn__ attributes.


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


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