[LLVMbugs] [Bug 11583] New: Macro Redefinition in MSVC compatibility mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 15 04:10:11 PST 2011


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

             Bug #: 11583
           Summary: Macro Redefinition in MSVC compatibility mode
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: eremeev at viva64.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


In code containing function-like macro overloading, for example:

#define RETERROR(x) return x
#define RETERROR(x,y) return x + 1    

int test()
{
    RETERROR(2);
}

Visual C++ compiler is able to processes this code, generating the C4003
warning (the missing argument being replaced by an empty string), while clang
exits with an error "too few arguments provided to function-like macro
invocation", being unable to process it and potentially making some Visual C++
projects uncompilable.

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