public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41970]  New: Unjustified "anonymous type" warning
@ 2009-11-06 13:45 igodard at pacbell dot net
  2009-11-06 14:09 ` [Bug c++/41970] " redi at gcc dot gnu dot org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: igodard at pacbell dot net @ 2009-11-06 13:45 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

This code:

enum {a, b, c} A = a;
namespace {
    enum {d, e, f} D = d;
    }
int main() { return 0; }

gets you:

foo.cc:1: warning: non-local variable ‘<anonymous enum> A’ uses anonymous type
foo.cc:3: warning: non-local variable ‘<unnamed>::<anonymous enum>
<unnamed>::D’ uses anonymous type

As A is local and D is not, it seems that one of the warnings is wrong. Or
maybe the warning doesn't mean what it appears to mean, in which case please
consider this to be a report about an incomprehensible diagnostic.


-- 
           Summary: Unjustified "anonymous type" warning
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-05-04  4:56 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 13:45 [Bug c++/41970] New: Unjustified "anonymous type" warning igodard at pacbell dot net
2009-11-06 14:09 ` [Bug c++/41970] " redi at gcc dot gnu dot org
2009-11-06 15:30 ` igodard at pacbell dot net
2009-11-06 15:43 ` redi at gcc dot gnu dot org
2009-11-06 15:48 ` redi at gcc dot gnu dot org
2009-11-06 18:22 ` igodard at pacbell dot net
2009-11-06 18:27 ` redi at gcc dot gnu dot org
2009-11-06 18:30 ` redi at gcc dot gnu dot org
2010-01-10 22:04 ` matt at use dot net
2010-01-10 22:24 ` igodard at pacbell dot net
2010-01-11 18:46 ` manu at gcc dot gnu dot org
2010-01-11 18:52 ` manu at gcc dot gnu dot org
2010-01-11 18:54 ` [Bug c++/41970] use of a type with no linkage to declare a variable with linkage manu at gcc dot gnu dot org
2010-01-12  1:00 ` redi at gcc dot gnu dot org
2010-01-12  1:08 ` redi at gcc dot gnu dot org
2010-01-12  1:12 ` igodard at pacbell dot net
2010-01-12 10:16 ` manu at gcc dot gnu dot org
2010-01-20 23:32 ` jason at gcc dot gnu dot org
2010-01-20 23:36 ` jason at gcc dot gnu dot org
2010-02-19 21:39 ` jason at gcc dot gnu dot org
2010-04-07 15:55 ` jason at gcc dot gnu dot org
2010-05-04  4:56 ` jason at gcc dot gnu dot org

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