[LLVMbugs] [Bug 11806] New: pretty-printing produces wrong cast in initialization code when many variables are defined in one statement

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 19 15:33:22 PST 2012


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

             Bug #: 11806
           Summary: pretty-printing produces wrong cast in initialization
                    code when many variables are defined in one statement
           Product: clang
           Version: 3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mm.5p4mbox at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Running "clang -cc1 -ast-print file.cpp" on following source:

struct S;
void fun(const void *a, const void *b)
{
   struct S* A = (struct S*)a, *B = (struct S*)b;
}

Produces following code that does not compile:

struct S;
void fun(const void *a, const void *b) {
    struct S *A = (struct S *)a, *B = (*)b;
}

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