This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35098] New: [4.1/4.24.3 regression] ICE with attribute unused in template
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2008 07:42:52 -0000
- Subject: [Bug c++/35098] New: [4.1/4.24.3 regression] ICE with attribute unused in template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following valid code snippet triggers an ICE since GCC 3.4.0:
===========================================================
template<typename T> struct A
{
T a, __attribute((unused)) b;
};
===========================================================
bug.cc:3: internal compiler error: in layout_type, at stor-layout.c:1864
Please submit a full bug report, [etc.]
Without the variable 'a' I get a warning (which is missing in the case above):
bug.cc:3: warning: 'unused' attribute ignored
--
Summary: [4.1/4.24.3 regression] ICE with attribute unused in
template
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35098