This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix -Wattributes warning in libstdc++ (PR libstdc++/89402)
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, Martin Sebor <msebor at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 22 Feb 2019 19:03:32 +0000
- Subject: Re: [PATCH] Fix -Wattributes warning in libstdc++ (PR libstdc++/89402)
- References: <20190220080731.GC2135@tucnak> <20190222011032.GA29002@redhat.com> <dde0291f-a953-3d84-4ecf-9fb988760e62@gmail.com> <20190222184736.GF7611@tucnak>
On Fri, 22 Feb 2019 at 18:47, Jakub Jelinek wrote:
>
> On Fri, Feb 22, 2019 at 08:35:25AM -0700, Martin Sebor wrote:
> > > /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")));
> > > | ^
> >
> > Are the attributes on this alias ever considered in calls to it?
> > If not (and assuming there's a way to tell, which I think there
> > should be but haven't verified it) the warning could be relaxed
>
> There is no point in relating this, this alias is just a hack in a hack
> to save a few bytes of code.
>
> I've now finally bootstrapped/regtested on {powerpc64le,s390x}-linux
> following patch, without it I indeed get those
> ../../../../libstdc++-v3/src/c++98/compatibility-ldbl.cc:78:65: warning: 'pure' attribute on function returning 'void' [-Wattributes]
> warnings, with the patch I don't get any warnings on compatibility-ldbl.cc
> anymore. Ok for trunk?
OK, thanks.