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.

2019-02-20  Jakub Jelinek  <ja...@redhat.com>

        PR libstdc++/89402
        * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
        _GLIBCXX_PURE to the alias declaration.

--- libstdc++-v3/src/c++98/compatibility-ldbl.cc.jj     2019-01-01 
12:39:41.530606161 +0100
+++ libstdc++-v3/src/c++98/compatibility-ldbl.cc        2019-02-19 
16:12:52.402123217 +0100
@@ -75,6 +75,6 @@ namespace std _GLIBCXX_VISIBILITY(defaul
 // and std::hash<long double>::operator()
 // are the same, no need to duplicate them.
 extern "C" void _ZNKSt4hashIeEclEe (void)
-  __attribute__((alias ("_ZNKSt3tr14hashIeEclEe")));
+  _GLIBCXX_PURE __attribute__((alias ("_ZNKSt3tr14hashIeEclEe")));
 
 #endif


        Jakub

Reply via email to