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

           Summary: -Wbool-conversions misses 'false' ICEs
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


$ cat test.cc
void foo(int* p);

void bar() {
    const bool kDebugMode = false;  // NULL pointer constant.
    foo(false);  // Warning.
    foo(false == true);  // No warning!
    foo(kDebugMode);  // No warning!
}
$ clang++ -Wbool-conversions -c test.cc
test.cc:5:9: warning: initialization of pointer of type 'int *' from literal
'false' [-Wbool-conversions]
    foo(false);  // Warning.
        ^
1 warning 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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to