[llvm-bugs] [Bug 30588] Clang-cl: Preprocessor concatenate strings failure with colons
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 1 11:05:06 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30588
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |INVALID
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Your code is incorrect. The token paste would form the invalid token
"A::B""::""C"; the MS preprocessor has a bug where it accepts such invalid
token pastes.
You have a couple of options here:
1) You can fix your code by removing the ##s:
#define M(O,P) #O ## "::" ## #P
2) You can pass -Wno-invalid-token-paste to Clang to disable the error; we will
then give the same incorrect result as MSVC.
--
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/20161001/8db0670a/attachment.html>
More information about the llvm-bugs
mailing list