[llvm-bugs] [Bug 39969] New: 123_p+1 combined with user defined literal should be ill-formed
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 11 23:02:26 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39969
Bug ID: 39969
Summary: 123_p+1 combined with user defined literal should be
ill-formed
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: yaghmour.shafik at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Given the following code
int operator"" _p(unsigned long long)
{ return 0; }
int test2()
{
return 123_p+1;
}
This should be ill-formed just like the following taken from this Stack
Overflow question https://stackoverflow.com/a/53726202/1708801
int operator"" _e(unsigned long long)
{ return 0; }
int test()
{
return 0x123_e+1;
}
Where I note due to maximal munch 0x123_e+1 is a pp-token but the same analysis
should also apply to 123_p+1 since the grammar for pp-token includes both:
pp-number e sign
pp-number p sign
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181212/021e1531/attachment.html>
More information about the llvm-bugs
mailing list