[LLVMbugs] [Bug 22529] New: Incorrect expansion of macro

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 10 06:51:40 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22529

            Bug ID: 22529
           Summary: Incorrect expansion of macro
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eremeev at viva64.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#define C(_line) #_line
#define _B(_line) C(_line)

#define A ""_B(__LINE__)

A

This code is expanded to 

""_B(9)

while I am expecting

"""9"

Renaming the _B macro to B or inserting a space before _B seems to solve the
issue.

-- 
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/20150210/7f663740/attachment.html>


More information about the llvm-bugs mailing list