[llvm-bugs] [Bug 24361] New: Marcos are treated as user-defined literals and are not expanded
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 5 07:05:22 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24361
Bug ID: 24361
Summary: Marcos are treated as user-defined literals and are
not expanded
Product: clang
Version: 3.6
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: dieselmachine at mail.ru
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
If you try to compile this code with -std=c++11, __DATE__ and __TIME__ macros
will be treated as user-defined literals. These macros are expanded correctly
for older standard.
const char* s = "Build "__DATE__" at "__TIME__" ";
Also note this comment in clang/lib/Lex/Lexer.cpp, line 1657. Why ud-suffix
takes precedence over macro? Macro should be expanded first.
// them. We assume a suffix beginning with a UCN or UTF-8 character is more
// likely to be a ud-suffix than a macro, however, and accept that.
--
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/20150805/e47077b6/attachment-0001.html>
More information about the llvm-bugs
mailing list