[Bug c++/24791] ICE on invalid instantiation of template's static member
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 17 10:39:00 GMT 2005
------- Comment #1 from reichelt at gcc dot gnu dot org 2005-11-17 10:39 -------
Confirmed.
The following code snippet causes an ICE since 2.95.3
with the exception of 4.0.0 - 4.0.2:
==================================
template<int> struct A
{
static int i;
A() { ++i; }
};
template<int> int A<0>::i(0);
A<0> a;
==================================
The following variation causes an ICE since 4.0.0 (and before 3.1)
and is accepted by GCC 3.1 - 3.4.5:
==================================
template<int> struct A
{
static int i;
};
template<int> int A<0>::i(0);
==================================
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid, monitored
Known to fail|2.95.3 3.0.4 |
Last reconfirmed|0000-00-00 00:00:00 |2005-11-17 10:39:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24791
More information about the Gcc-bugs
mailing list