This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16160] New: Does not reject invalid attempt of explicit instantiation
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2004 16:21:43 -0000
- Subject: [Bug c++/16160] New: Does not reject invalid attempt of explicit instantiation
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code is invalid, yet we do not (and never have) issue a diagnostic:
-------------------
template <int N> struct X {};
struct X<2>;
-------------------
That's particularly bad, since it can lead to very subtle problems: in my
application, X had a whole number of members, and I had really meant to
_instantiate_ it with
template struct X<2>;
but forgot the 'template'. I just ended up with missing instantiations for
which I didn't have a good explanation :-]
W.
--
Summary: Does not reject invalid attempt of explicit
instantiation
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16160