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++/33744] New: > within function-style cast incorrectly parsed as closing template angle bracket


This compiled with 3.3:

template <bool cond>
struct A {
};

A< bool (2 > 1) > x;

It doesn't compile with at least some later versions, including 3.4 and 4.2.1,
with:

x.cpp:4: error: template argument 1 is invalid
x.cpp:4: error: invalid type in declaration before ';' token

Rejects-valid regression in the new parser in 3.4?


-- 
           Summary: > within function-style cast incorrectly parsed as
                    closing template angle bracket
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mdorey at bluearc dot com


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


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