template<typename T> struct foo{};
void bar() { enum X{a,b,c}; foo<X> f; };


gets you:


foo.cc: In function `void bar()':
foo.cc:2: error: `bar()::X' uses local type `bar()::X'
foo.cc:2: error:   trying to instantiate `template<class T> struct foo'
foo.cc:2: error: invalid type in declaration before ';' token


-- 
           Summary: bad diagnostic
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24326

Reply via email to