[LLVMbugs] [Bug 6585] New: ambiguous expression is parsed as functional cast when in BinaryOperator (Comma)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 11 19:23:02 PST 2010


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

           Summary: ambiguous expression is parsed as functional cast when
                    in BinaryOperator (Comma)
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mikem.llvm at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4485)
 --> (http://llvm.org/bugs/attachment.cgi?id=4485)
reduction: foo.cpp

The attached code fails to compile with g++:

foo.cpp: In function ‘void foo()’:
foo.cpp:4: error: variable or field ‘a’ declared void
foo.cpp:4: error: expected unqualified-id before ‘++’ token

But does compile with clang++:

foo.cpp:4:10: warning: expression result unused [-Wunused-value]
    void(a),++a;
         ^
1 diagnostic generated.

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