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++/57771] New: g++ misinterprets >> in static_cast


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

            Bug ID: 57771
           Summary: g++ misinterprets >> in static_cast
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mustrumr97 at gmail dot com

template<int a>
struct s{};
s<static_cast<int>(4>>2)> x;

This works in C++98 mode but fails in C++11 mode.
Maybe g++ misunderstands >> as closing angle brackets, but this does not make
sense because they are in (). clang++ compiles this code. This looks like bug
37875 but for casts.


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