On Fri, Feb 22, 2019 at 01:10:32AM +0000, Jonathan Wakely wrote:
On 20/02/19 09:07 +0100, Jakub Jelinek wrote:
> Hi!
>
> The following patch fixes a warning when building on targets where long
> double switched from being the same as double to something wider,
> like e.g. powerpc*-linux, alpha*-linux, s390*-linux etc.
>
> Fixed thusly, bootstrapped/regtested on {x86_64,i686,s390x}-linux and
> bootstrapped on powerpc64le-linux, on both s390x and powerpc64le it removed
> all
> ../../../../libstdc++-v3/src/c++98/compatibility-ldbl.cc:77:17: warning: 'void _ZNKSt4hashIeEclEe()' specifies less restrictive attribute than its target 'std::size_t std::tr1::hash<_Tp>::operator()(_Tp) const [with _Tp = long double]': 'pure' [-Wmissing-attributes]
> warnings from the build log. Preapproved by Jonathan in the PR, committed
> to trunk.
Now I see:
/home/jwakely/src/gcc/libstdc++-v3/src/c++98/compatibility-ldbl.cc:78:65: warning: ‘pure’ attribute on function returning ‘void’ [-Wattributes]
78 | _GLIBCXX_PURE __attribute__((alias ("_ZNKSt3tr14hashIeEclEe")));
| ^
We can disable that with a diagnostic pragma.
Oops, sorry, missed that.
Or make it extern "C" size_t _ZNKSt4hashIeEclEe (long double) or so, after all,
that is what it returns and what it takes as an argument.