This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33858] Spurious warning with anonymous namespace and anonymous types
- From: "tobi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2009 18:53:50 -0000
- Subject: [Bug c++/33858] Spurious warning with anonymous namespace and anonymous types
- References: <bug-33858-4019@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from tobi at gcc dot gnu dot org 2009-05-08 18:53 -------
Note that the C-like equivalent doesn't warn (at least with g++ 4.1.2):
$ cat user/t.cc
namespace {
struct {
} t;
}
static struct {
} s;
$ g++ -c user/t.cc
user/t.cc:3: warning: non-local variable '<unnamed>::<anonymous struct>
<unnamed>::t' uses anonymous type
$
--
tobi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
Last reconfirmed|2007-12-02 22:24:33 |2009-05-08 18:53:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33858