This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57771] New: g++ misinterprets >> in static_cast
- From: "mustrumr97 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 01 Jul 2013 19:57:06 +0000
- Subject: [Bug c++/57771] New: g++ misinterprets >> in static_cast
- Auto-submitted: auto-generated
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.