This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12349] New: gcc accepts specialization of template in typedef


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]