This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32054] New: Storage classes on anonymous unions in classes
- From: "andrew dot stubbs at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2007 09:24:23 -0000
- Subject: [Bug c++/32054] New: Storage classes on anonymous unions in classes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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