public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32054] New: Storage classes on anonymous unions in classes
@ 2007-05-23 9:24 andrew dot stubbs at st dot com
2008-12-31 18:03 ` [Bug c++/32054] " pinskia at gcc dot gnu dot org
2009-12-26 14:30 ` paolo dot carlini at oracle dot com
0 siblings, 2 replies; 5+ messages in thread
From: andrew dot stubbs at st dot com @ 2007-05-23 9:24 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/32054] Storage classes on anonymous unions in classes
2007-05-23 9:24 [Bug c++/32054] New: Storage classes on anonymous unions in classes andrew dot stubbs at st dot com
@ 2008-12-31 18:03 ` pinskia at gcc dot gnu dot org
2009-12-26 14:30 ` paolo dot carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-31 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-31 18:00 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2008-12-31 18:00:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/32054] Storage classes on anonymous unions in classes
2007-05-23 9:24 [Bug c++/32054] New: Storage classes on anonymous unions in classes andrew dot stubbs at st dot com
2008-12-31 18:03 ` [Bug c++/32054] " pinskia at gcc dot gnu dot org
@ 2009-12-26 14:30 ` paolo dot carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-26 14:30 UTC (permalink / raw)
To: gcc-bugs
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32054
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/32054] Storage classes on anonymous unions in classes
[not found] <bug-32054-4@http.gcc.gnu.org/bugzilla/>
2012-05-25 23:42 ` paolo at gcc dot gnu.org
@ 2012-05-26 0:02 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-26 0:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32054
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC|gcc-bugs at gcc dot gnu.org |
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-25 23:42:28 UTC ---
Fixed for 4.8.0.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/32054] Storage classes on anonymous unions in classes
[not found] <bug-32054-4@http.gcc.gnu.org/bugzilla/>
@ 2012-05-25 23:42 ` paolo at gcc dot gnu.org
2012-05-26 0:02 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-05-25 23:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32054
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-05-25 23:40:17 UTC ---
Author: paolo
Date: Fri May 25 23:40:10 2012
New Revision: 187902
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187902
Log:
/cp
2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32054
* parser.c (cp_parser_member_declaration): A storage class is not
allowed in a declaration of an anonymous aggregate in a class scope.
/testsuite
2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/32054
* g++.dg/other/anon-union3.C: New.
Added:
trunk/gcc/testsuite/g++.dg/other/anon-union3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-25 23:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-23 9:24 [Bug c++/32054] New: Storage classes on anonymous unions in classes andrew dot stubbs at st dot com
2008-12-31 18:03 ` [Bug c++/32054] " pinskia at gcc dot gnu dot org
2009-12-26 14:30 ` paolo dot carlini at oracle dot com
[not found] <bug-32054-4@http.gcc.gnu.org/bugzilla/>
2012-05-25 23:42 ` paolo at gcc dot gnu.org
2012-05-26 0:02 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).