public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/29365] Unnecessary anonymous namespace warnings
Date: Tue, 28 Aug 2007 21:41:00 -0000	[thread overview]
Message-ID: <20070828214105.8209.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29365-7796@http.gcc.gnu.org/bugzilla/>



------- Comment #36 from bangerth at dealii dot org  2007-08-28 21:40 -------
(In reply to comment #35)

> 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.

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. Never using means not
even passing around the pointer, i.e. the class better not has an inline
function in the header file in which the pointer is used. However, as long
as the entire handling of the pointer is inside a single TU, nothing is
wrong with the code.

Now, whether that's good style is clearly a different matter...

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365


  parent reply	other threads:[~2007-08-28 21:41 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 [this message]
2007-08-28 22:11   ` Andrew Pinski
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=20070828214105.8209.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).