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

            Bug ID: 15617
           Summary: suppress "expression result unused" when expression is
                    parsed with errors
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

On the following code:

int main()
{
    sizeof (int) 0;
}

Clang gives too many errors:

CLANG
1.cpp:3:17: error: expected ';' after expression
    sizeof (int) 0;
                ^
                ;
1.cpp:3:5: warning: expression result unused
    sizeof (int) 0;
    ^~~~~~~~~~~~
1.cpp:3:18: warning: expression result unused
    sizeof (int) 0;
                 ^
2 warnings and 1 error generated.
GCC
1.cpp: In function 'int main()':
1.cpp:3:18: error: expected ';' before numeric constant
MSVC2012 NOV CTP
1.cpp
1.cpp(3) : error C2143: syntax error : missing ';' before 'constant'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to