This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15938] ICE with anonymous unions


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]