https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #8 from Jonathan Wakely ---
Also the new testcase for this bug has undefined behaviour. _ID is a reserved
name so the program cannot use it to define a macro or a UDL.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #7 from Jonathan Wakely ---
Moved to PR 84517
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #6 from Jonathan Wakely ---
Testing this:
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1903,7 +1903,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token,
const uchar *base,
literal thus breaking the program.
Try to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #5 from Jonathan Wakely ---
Is there a way to check if it's a pre-defined macro?
Or just change the condition to allow starting with two underscores, but not
allow starting with one (since user-defined UDLs must start with a single
u
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #4 from Jonathan Wakely ---
This causes a regression for:
const char* err() { return "Error in "__FILE__; }
file.cc: In function ‘const char* err()’:
file.cc:1:28: error: unable to find string literal operator
‘operator""__FILE__’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
Paolo Carlini changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
--- Comment #2 from paolo at gcc dot gnu.org ---
Author: paolo
Date: Mon Nov 6 10:33:41 2017
New Revision: 254443
URL: https://gcc.gnu.org/viewcvs?rev=254443&root=gcc&view=rev
Log:
/libcpp
2017-11-06 Mukesh Kapoor
PR c++/80955
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
Mukesh Kapoor changed:
What|Removed |Added
CC||mukesh.kapoor at oracle dot com
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|