[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


            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__)


This code is expanded to 


while I am expecting


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

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