From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19068 invoked by alias); 23 May 2007 09:05:24 -0000 Received: (qmail 18904 invoked by uid 48); 23 May 2007 09:05:09 -0000 Date: Wed, 23 May 2007 09:05:00 -0000 Subject: [Bug c++/32053] New: Anonymous union members' names should be distinct within enclosing scope X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "andrew dot stubbs at st dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg02021.txt.bz2 The following program should not compile: extern int foo; static union { int foo; // clash }; C++ standard clause 9.5/2 states that members of anonymous unions must have names distinct from other names in the same scope. If the `extern' keyword is removed from the example above, the error is diagnosed correctly (followed by an ICE). -- Summary: Anonymous union members' names should be distinct within enclosing scope Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andrew dot stubbs at st dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32053