This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28058] [4.1/4.2 regression] ICE in inline_forbidden_p
- 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: 12 Jul 2006 16:39:34 -0000
- Subject: [Bug c++/28058] [4.1/4.2 regression] ICE in inline_forbidden_p
- References: <bug-28058-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from reichelt at gcc dot gnu dot org 2006-07-12 16:39 -------
Here's a testcase that crashes even at -O0 since GCC 4.1.0:
===========================
template<int> struct A
{
A() {}
};
A<0> a;
template<> A<0>::A() {}
===========================
As Wolfgang already mentioned: explicit specializations must be declared
before they are first used.
However, no diagnostic is required. (Which indicates that such situations
are hard to detect reliably.)
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28058