This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2005 20:22:12 -0000
- Subject: [Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
- References: <20050222201718.20153.us15@os.inf.tu-dresden.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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