[LLVMbugs] [Bug 4006] New: variable argument macro argumetn count issues

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Apr 19 00:21:20 PDT 2009


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

           Summary: variable argument macro argumetn count issues
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: NetBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: neil at daikokuya.co.uk
                CC: llvmbugs at cs.uiuc.edu


#define e(...) __VA_ARGS__
#if e() 0
#error
#endif

gives

~/src/nobackup/llvm/Release-Asserts/bin/clang-cc -pedantic-errors -std=c99
/tmp/bug.c
/tmp/bug.c:1:16: error: __VA_ARGS__ can only appear in the expansion of a C99
variadic macro
#define e(...) __VA_ARGS__
               ^
/tmp/bug.c:2:7: error: varargs argument missing, but tolerated as an extension
#if e() 0
      ^
2 diagnostics generated.

both of which appear bogus.


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