public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15938] New: ICE with anonymous unions
@ 2004-06-11 12:24 reichelt at gcc dot gnu dot org
  2004-06-11 13:33 ` [Bug c++/15938] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-11 12:24 UTC (permalink / raw)
  To: gcc-bugs

The following code is accepted by the C frontend, but the C++ frontend
segfaults (since gcc 2.95.x).

===================================
typedef union
{
    struct { int i; };
    struct { char c; };
} A;

A a = { 0 };
===================================

bug.cc:7: error: union `A' with no named members cannot be initialized
bug.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

Apart from the segfault, should the code be accepted by the C++ frontend
as well or should it be rejected as it is now?

BTW, the PR was inspired by a question on the gcc mailing list:
http://gcc.gnu.org/ml/gcc/2004-06/msg00158.html

-- 
           Summary: ICE with anonymous unions
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15938


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-11-27 23:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15938-1771@http.gcc.gnu.org/bugzilla/>
2005-10-05 19:37 ` [Bug c++/15938] ICE with anonymous unions pinskia at gcc dot gnu dot org
2005-10-13 11:22 ` reichelt at gcc dot gnu dot org
2005-11-25 15:45 ` reichelt at gcc dot gnu dot org
2005-11-27 23:38 ` giovannibajo at libero dot it
2004-06-11 12:24 [Bug c++/15938] New: " reichelt at gcc dot gnu dot org
2004-06-11 13:33 ` [Bug c++/15938] " pinskia at gcc dot gnu dot org
2005-01-06  2:02 ` pinskia at gcc dot gnu dot org
2005-03-20 20:13 ` pcarlini at suse dot de
2005-07-20 13:46 ` reichelt at gcc dot gnu dot org
2005-07-21  2:08 ` giovannibajo at libero dot it
2005-07-21  2:53 ` gdr at integrable-solutions dot net
2005-07-21 13:23 ` giovannibajo at libero dot it
2005-07-21 15:12 ` cvs-commit at gcc dot gnu dot org
2005-07-21 15:15 ` reichelt at gcc dot gnu dot org
2005-07-21 15:56 ` giovannibajo at libero dot it
2005-07-23  5:03 ` pinskia at gcc dot gnu dot org

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