[LLVMbugs] [Bug 5043] New: Error compiling ASTContext.cpp with VS2008

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Sep 24 14:14:55 PDT 2009


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

           Summary: Error compiling ASTContext.cpp with VS2008
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AST
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Jeff.Krall at faircom.com
                CC: llvmbugs at cs.uiuc.edu


Attempting to compile ASTContext.cpp at revision 82705 using the Visual Studio
2008 compiler fails with the following error:

.\ASTContext.cpp(1107) : error C2371: 'F' : redefinition; different basic types
        .\ASTContext.cpp(1104) : see declaration of 'F'

It seems that the scope of variable F declared on line 1104 extends to the
block of code that begins on line 1107. I was able to work around the compile
error by changing the variable F on lines 1104 and 1105 in my working copy to
Fnop, as shown below:

    if (const FunctionNoProtoType *Fnop = T->getAs<FunctionNoProtoType>()) {
      ResultType = getFunctionNoProtoType(Fnop->getResultType(), true);
    } else {
      const FunctionProtoType *F = T->getAs<FunctionProtoType>();


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