This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70587] New: 0e1_p+0 should not be parsed as a single pp-number in C++14 and earlier
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Apr 2016 22:34:15 +0000
- Subject: [Bug c++/70587] New: 0e1_p+0 should not be parsed as a single pp-number in C++14 and earlier
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70587
Bug ID: 70587
Summary: 0e1_p+0 should not be parsed as a single pp-number in
C++14 and earlier
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
Target Milestone: ---
p/P followed by +/- is not part of the pp-number production in C++ before
C++17, but GCC includes them anyway. This results in the following code being
erroneously rejected in C++11/14 mode:
long double operator""_p(long double) { return {}; }
auto x = 0e1_p+0; // should be parsed as 0e1_p + 0
// but parsed as a single pp-number instead and rejected