From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 760 invoked by alias); 6 Mar 2006 03:25:03 -0000 Received: (qmail 681 invoked by uid 48); 6 Mar 2006 03:25:00 -0000 Date: Mon, 06 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 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00578.txt.bz2 List-Id: 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