public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/57771] New: g++ misinterprets >> in static_cast @ 2013-07-01 19:57 mustrumr97 at gmail dot com 2013-07-01 20:55 ` [Bug c++/57771] " jakub at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: mustrumr97 at gmail dot com @ 2013-07-01 19:57 UTC (permalink / raw) To: gcc-bugs 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57771] g++ misinterprets >> in static_cast 2013-07-01 19:57 [Bug c++/57771] New: g++ misinterprets >> in static_cast mustrumr97 at gmail dot com @ 2013-07-01 20:55 ` jakub at gcc dot gnu.org 2013-07-01 20:56 ` jakub at gcc dot gnu.org 2013-07-03 20:29 ` jakub at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2013-07-01 20:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57771 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-07-01 CC| |jakub at gcc dot gnu.org Target Milestone|--- |4.8.2 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57771] g++ misinterprets >> in static_cast 2013-07-01 19:57 [Bug c++/57771] New: g++ misinterprets >> in static_cast mustrumr97 at gmail dot com 2013-07-01 20:55 ` [Bug c++/57771] " jakub at gcc dot gnu.org @ 2013-07-01 20:56 ` jakub at gcc dot gnu.org 2013-07-03 20:29 ` jakub at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2013-07-01 20:56 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57771 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 30416 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30416&action=edit gcc49-pr57771.patch Untested fix. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/57771] g++ misinterprets >> in static_cast 2013-07-01 19:57 [Bug c++/57771] New: g++ misinterprets >> in static_cast mustrumr97 at gmail dot com 2013-07-01 20:55 ` [Bug c++/57771] " jakub at gcc dot gnu.org 2013-07-01 20:56 ` jakub at gcc dot gnu.org @ 2013-07-03 20:29 ` jakub at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jakub at gcc dot gnu.org @ 2013-07-03 20:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57771 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Jul 3 20:20:30 2013 New Revision: 200647 URL: http://gcc.gnu.org/viewcvs?rev=200647&root=gcc&view=rev Log: PR c++/57771 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST> Temporarily set parser->greater_than_is_operator_p for cp_parser_expression and restore from saved value afterwards. * g++.dg/template/arg9.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/arg9.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog Author: jakub Date: Wed Jul 3 20:22:16 2013 New Revision: 200648 URL: http://gcc.gnu.org/viewcvs?rev=200648&root=gcc&view=rev Log: PR c++/57771 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST> Temporarily set parser->greater_than_is_operator_p for cp_parser_expression and restore from saved value afterwards. * g++.dg/template/arg9.C: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/g++.dg/template/arg9.C Modified: branches/gcc-4_8-branch/gcc/cp/ChangeLog branches/gcc-4_8-branch/gcc/cp/parser.c branches/gcc-4_8-branch/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-03 20:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-07-01 19:57 [Bug c++/57771] New: g++ misinterprets >> in static_cast mustrumr97 at gmail dot com 2013-07-01 20:55 ` [Bug c++/57771] " jakub at gcc dot gnu.org 2013-07-01 20:56 ` jakub at gcc dot gnu.org 2013-07-03 20:29 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).