[Bug c++/16160] New: Does not reject invalid attempt of explicit instantiation
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Wed Jun 23 16:35:00 GMT 2004
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
More information about the Gcc-bugs
mailing list