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++/47144] New: Doesn't reject attempt to define type in template argument; results in weird parse


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

           Summary: Doesn't reject attempt to define type in template
                    argument; results in weird parse
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schaub.johannes@googlemail.com


GCC accepts the following:

template<typename> struct A { }; A< struct B { } >::SomeNonSense int y;

Seems like internally it creates the specialization for "A< ::B >", but its
parser goes mad at some part. It's not allowed to define types in template
arguments. C++03 seems to have missed to explicitly state that, but n3225 says
so explicitly.


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