From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31761 invoked by alias); 23 May 2007 09:24:42 -0000 Received: (qmail 31730 invoked by uid 48); 23 May 2007 09:24:23 -0000 Date: Wed, 23 May 2007 09:24:00 -0000 Subject: [Bug c++/32054] New: Storage classes on anonymous unions in classes 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/msg02022.txt.bz2 The following program should not compile. class C { auto union // bad { int a; }; register union // bad { int b; }; static union // bad { int c; }; extern union // bad { int d; }; mutable union // bad { int e; }; }; auto, register, and extern are not normally allowed in classes. static and mutable might be allowed on other members, but not on anonymous unions. See C++ standard clause 9.5/3. -- Summary: Storage classes on anonymous unions in classes 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=32054