public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Andrew Pinski" <pinskia@gmail.com>
To: gcc-bugzilla@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug c++/29365] Unnecessary anonymous namespace warnings
Date: Tue, 28 Aug 2007 22:11:00 -0000	[thread overview]
Message-ID: <de8d50360708281510j1f5661e1w8eb92b2a7cd78135@mail.gmail.com> (raw)
In-Reply-To: <20070828214105.8209.qmail@sourceware.org>

On 28 Aug 2007 21:41:05 -0000, bangerth at dealii dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> That's what I thought too at first, but the request is valid anyway as long
> as you never use the pointer to the class from anywhere except the one
> implementation file in which the class is defined.

No it is not, it is still violating One definition rule as struct X
will have a different member type for pimpl_ in each TU (this violates
the whole idea of types being exported).  This is going to be true no
matter what, even if you change the warning.  Now you can use a
"void*" to get around this issue and should solve the issue and not
violate the C++ ODR.

This warning is not about style, it is about warning when you are most
likely going to violat C++'s One definition rule with anonymous
namespaces and you do violate it here as explained above.

Thanks,
Andrew Pinski


  reply	other threads:[~2007-08-28 22:11 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06  6:08 [Bug c++/29365] New: " gcc at magfr dot user dot lysator dot liu dot se
2006-10-06  6:09 ` [Bug c++/29365] " gcc at magfr dot user dot lysator dot liu dot se
2006-10-06 12:59 ` pinskia at gcc dot gnu dot org
2006-10-06 18:36 ` jason at gcc dot gnu dot org
2006-10-06 18:48 ` gcc at magfr dot user dot lysator dot liu dot se
2006-10-06 21:01 ` jason at gcc dot gnu dot org
2006-10-10  3:54 ` bangerth at dealii dot org
2007-03-12  9:37 ` Woebbeking at web dot de
2007-04-03 22:50 ` spark at gcc dot gnu dot org
2007-04-03 23:11 ` pinskia at gcc dot gnu dot org
2007-04-03 23:19 ` spark at gcc dot gnu dot org
2007-04-03 23:30 ` crowl at google dot com
2007-04-04 16:40 ` patchapp at dberlin dot org
2007-04-16 16:49 ` spark at gcc dot gnu dot org
2007-04-16 18:24 ` pinskia at gcc dot gnu dot org
2007-04-17  6:16 ` gcc at magfr dot user dot lysator dot liu dot se
2007-04-17  6:18 ` gcc at magfr dot user dot lysator dot liu dot se
2007-04-17 16:37 ` spark at gcc dot gnu dot org
2007-04-17 16:51 ` pluto at agmk dot net
2007-04-18  5:25 ` gcc at user dot lysator dot liu dot se
2007-05-03 12:00 ` aaronavay62 at aaronwl dot com
2007-06-05 17:26 ` pluto at agmk dot net
2007-06-05 22:37 ` spark at gcc dot gnu dot org
2007-06-06  4:49 ` pluto at agmk dot net
2007-06-06  9:24 ` pinskia at gcc dot gnu dot org
2007-06-06 10:09 ` pluto at agmk dot net
2007-06-06 11:23 ` manu at gcc dot gnu dot org
2007-06-25 18:13 ` spark at gcc dot gnu dot org
2007-08-20 15:40 ` jason at gcc dot gnu dot org
2007-08-22 17:24 ` jason at gcc dot gnu dot org
2007-08-22 20:40 ` jason at gcc dot gnu dot org
2007-08-22 21:50 ` jason at gcc dot gnu dot org
2007-08-28 19:40 ` pluto at agmk dot net
2007-08-28 20:48   ` Andrew Pinski
2007-08-28 20:48 ` pinskia at gmail dot com
2007-08-28 21:41 ` bangerth at dealii dot org
2007-08-28 22:11   ` Andrew Pinski [this message]
2007-08-28 22:11 ` pinskia at gmail dot com
2007-08-29  3:15 ` bangerth at dealii dot org
2007-08-29  8:52   ` Andrew Pinski
2007-08-29 13:19     ` Gabriel Dos Reis
2007-08-29  8:53 ` pinskia at gmail dot com
2007-08-29 13:20 ` gdr at cs dot tamu dot edu
2007-10-22 18:13 ` jason at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de8d50360708281510j1f5661e1w8eb92b2a7cd78135@mail.gmail.com \
    --to=pinskia@gmail.com \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).