[Bug c++/12349] New: gcc accepts specialization of template in typedef
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 21 04:25:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12349
Summary: gcc accepts specialization of template in typedef
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: minor
Priority: P3
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
Very minor problem: this is accepted though I think it shouldn't really:
-----------------------------------
template <int> struct X;
template <> typedef struct X<0> {} T;
-----------------------------------
At least some other compilers barf at it. The fact that it is accepted
is absolutely irrelevant, since one can't do anything with the so-declared
type T -- if I try to use it in
-----------------------------------
template <int> struct X;
template <> typedef struct X<0> {} T;
T t;
-----------------------------------
I get from present mainline this:
tmp/build-gcc> ../build-gcc/gcc-install/bin/c++ -c x.cc
x.cc:3: error: `T' does not name a type
W.
More information about the Gcc-bugs
mailing list