This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26573] New: [4.0/4.1/4.2 regression] Duplicate message for static member in local class
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2006 03:25:00 -0000
- Subject: [Bug c++/26573] New: [4.0/4.1/4.2 regression] Duplicate message for static member in local class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet
==================================
void foo()
{
struct A { static int i; };
}
==================================
triggers a duplicate error message since GCC 3.1:
bug.cc: In function 'void foo()':
bug.cc:3: error: local class 'struct foo()::A' shall not have static data
member 'int foo()::A::i'
bug.cc:3: error: field 'foo()::A::i' in local class cannot be static
The first error message was probably added back then because the second
message isn't issued if foo is a template function.
--
Summary: [4.0/4.1/4.2 regression] Duplicate message for static
member in local class
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: diagnostic, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26573