This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15938] ICE with anonymous unions
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jul 2005 13:18:52 -0000
- Subject: [Bug c++/15938] ICE with anonymous unions
- References: <20040611122359.15938.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2005-07-21 13:18 -------
=================================================
typedef union
{
struct { int i; };
struct { char c; };
} A;
A a = { 0 };
A b = {{ 0 }};
A c = {{{ 0 }}}; // { dg-error "braces" }
=================================================
pr15938.cc:9: error: braces around scalar initializer for type 'int'
I believe everything is correct.
Volker, would you mind committing this testcase and closing this bug?
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15938