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++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-22 20:22 -------
Reduced to:
template <typename T>
void
foo()
{
    union { struct {  };  };
}


This is invalid code, if we do without template function we get an error:
t.cc: In function ?void foo()?:
t.cc:8: error: anonymous struct not inside named type
t.cc:8: warning: anonymous union with no members

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-22 20:22:12
               date|                            |
            Summary|ICE when C++ template       |[3.4/4.0 Regression] ICE
                   |function contains anonymous |when C++ template function
                   |union                       |contains anonymous union
   Target Milestone|---                         |3.4.4


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


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