This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12349] New: gcc accepts specialization of template in typedef
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Sep 2003 22:32:01 -0000
- Subject: [Bug c++/12349] New: gcc accepts specialization of template in typedef
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.