[llvm-bugs] [Bug 30588] New: Clang-cl: Preprocessor concatenate strings failure with colons

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 1 10:45:54 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30588

            Bug ID: 30588
           Summary: Clang-cl: Preprocessor concatenate strings failure
                    with colons
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17393
  --> https://llvm.org/bugs/attachment.cgi?id=17393&action=edit
Reproduction

While trying to compile our MSVC code base with clang-cl, we found a
preprocessor error in string-concatenations.

If we define our concatenate the following way: (See attachment for full
reproduction)
#define M(O,P) #O ## "::" ## #P

it cannot be called with M(A::B, C)

Instead it gives errors:
error: pasting formed '"A::B""::"', an invalid preprocessing token
[-Winvalid-token-paste]

-- 
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/7bc0c409/attachment-0001.html>


More information about the llvm-bugs mailing list