This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ToT build problem with nextafterl/nexttowardl (when using ToT GCC)
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: sellcey at cavium dot com, libc-alpha <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com, Martin Sebor <msebor at gmail dot com>
- Date: Fri, 08 Dec 2017 19:51:10 +0000
- Subject: Re: ToT build problem with nextafterl/nexttowardl (when using ToT GCC)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <1512751903.23303.23.camel@cavium.com> <1512760947.23303.26.camel@cavium.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 08/12/17 19:22, Steve Ellcey wrote:
> I have tracked the glibc build problem down to this GCC patch:
>
> +2017-12-07 Martin Sebor <msebor@redhat.com>
> +
> + PR c/81544
> + * attribs.c (empty_attribute_table): Initialize new member of
> (many more lines)
>
> But I am not sure if this is a bug with the patch or an issue with the
> glibc sources where there is an inconsistency in how these two
> functions are declared.
>
looks like a gcc bug to me:
an implementation may provide stricter guarantee (const)
than what the compiler assumes for the builtins (pure).
(and i thought functions that may set errno are not pure)
> On Fri, 2017-12-08 at 08:51 -0800, Steve Ellcey wrote:
>> Is anyone else seeing this problem when building glibc. I am using
>> the
>> ToT GCC to build ToT glibc.
>>
>> Steve Ellcey
>> sellcey@cavium.com
>>
>>
>>
>> In file included from ../include/bits/mathcalls.h:1,
>> from ../math/math.h:350,
>> from ../include/math.h:7,
>> from ../sysdeps/aarch64/fpu/s_llround.c:19:
>> ../math/bits/mathcalls.h:259:1: error: ignoring attribute ‘const’ in
>> declaration of a built-in function ‘nextafterl’ because it conflicts
>> with attribute ‘pure’ [-Werror=attributes]
>> __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y),
>> (__const__));
>> ^~~~~~~~~~~
>> <built-in>: note: previous declaration here
>> ../math/bits/mathcalls.h:261:1: error: ignoring attribute ‘const’ in
>> declaration of a built-in function ‘nexttowardl’ because it conflicts
>> with attribute ‘pure’ [-Werror=attributes]
>> __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y),
>> (__const__));
>> ^~~~~~~~~~~
>> <built-in>: note: previous declaration here