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: Kang-Che Sung <explorer09 at gmail dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Jakub Jelinek <jakub at redhat dot com>, Marek Polacek <mpolacek at redhat dot com>
- Date: Tue, 21 Mar 2017 10:14:47 +0800
- Subject: Re: [PATCH] Correct __GNUC_PREREQ for __const__ and __noreturn__ attributes.
- Authentication-results: sourceware.org; auth=none
- References: <20170320175239.5982-1-explorer09@gmail.com> <43b02c96-57b4-bfd4-57a5-d072fdb61cb1@redhat.com>
On Tue, Mar 21, 2017 at 2:01 AM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 03/20/2017 01:52 PM, Kang-Che Sung wrote:
>> Although GCC 2.5 introduced 'const' and 'noreturn' function
>> attributes, the '__const__' and '__noreturn__' were not available
>> until 2.6.2. So check __GNU_PREREQ(2,7) for these.
>>
>> Note: I'm here only to correct an inaccurate info. Because I guess
>> very few people would use such an old compiler now, I'm not bothered to
>> test, nor add support for __attribute__((const)) just for it's sake.
>
> Kang-Che,
>
> So you did not test this change with a gcc-2.5 compiler?
No, I only correct this based on the ONEWS entries in gcc package...
https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/ONEWS?view=markup
...and a ChangeLog entry dated 1994...
> Thu Nov 10 18:02:58 1994 Michael Meissner <meissner@pasta.osf.org>
> * c-common.c (decl_attributes): Check for attributes with leading
> and trailing double underscores.
...and a source diff of 2.6.2 proving that "__const__" is added here:
https://ftp.gnu.org/old-gnu/gcc/Version2.diffs/gcc-2.6.1-2.6.2.diff.gz
(By the way, this is my first time submitting a patch for glibc. So
excuse if I did something wrong)