This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c++/29365] Unnecessary anonymous namespace warnings
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: gcc-bugzilla at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Aug 2007 13:47:53 -0700
- Subject: Re: [Bug c++/29365] Unnecessary anonymous namespace warnings
- References: <bug-29365-7796@http.gcc.gnu.org/bugzilla/> <20070828194014.3365.qmail@sourceware.org>
On 28 Aug 2007 19:40:14 -0000, pluto at agmk dot net
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #34 from pluto at agmk dot net 2007-08-28 19:40 -------
> (In reply to comment #33)
> > Fixed.
> >
>
> one more testcase:
>
> $ cat X.hpp
> namespace { class Impl; }
> struct X
> {
> ~X();
> Impl* pimpl_;
> };
>
> $ cat X.cpp
> #include "X.hpp"
> X::~X()
> {
> }
In this case, the warning is correct as Impl will be different in each
Translation Unit so X can never be the same between two of them.
-- Pinski