[LLVMbugs] [Bug 9620] New: Macro arguments fail with variadic Objective-C message

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 4 00:51:40 PDT 2011


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

           Summary: Macro arguments fail with variadic Objective-C message
           Product: clang
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: me at jonathonmah.com
                CC: llvmbugs at cs.uiuc.edu


The following should make it through the preprocessor:

void *something;
#define vararg_msg(x)  something = (x)
vararg_msg([nil msg:1, 2, 3]);


Instead there are errors:
% clang objc-pp.m -fsyntax-only -pedantic -ffreestanding
objc-pp.m:3:24: error: too many arguments provided to function-like macro
invocation
vararg_msg([nil msg:1, 2, 3]);
                       ^
objc-pp.m:3:1: error: unknown type name 'vararg_msg'
vararg_msg([nil msg:1, 2, 3]);
^
objc-pp.m:3:27: error: expected identifier or '('
vararg_msg([nil msg:1, 2, 3]);
                          ^
3 errors generated.


I am running Mac OS X 10.7 developer preview 2 (11A419).
% clang --version
Apple clang version 2.0 (tags/Apple/clang-138) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin11
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list