[LLVMbugs] [Bug 17974] New: -Wall does not enable -Wconditional-uninitialized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 17 23:02:37 PST 2013


            Bug ID: 17974
           Summary: -Wall does not enable -Wconditional-uninitialized
           Product: clang
           Version: 3.3
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: christophe at taodyne.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Bug #17940 reported a case where gcc reports an uninitialised variable at -Wall
-O2, but clang does not. The bug was marked as "RESOLVED INVALID" because the
option -Wconditional-uninitialized exposes the bug. So I'm opening a new bug
because -Wall obviously does not enable that option:

ddd at Marypuce ~> clang -Wall -c -O2 /tmp/undetected.cpp 
ddd at Marypuce ~> clang -Wconditional-uninitialized -c -O2 /tmp/undetected.cpp 
/tmp/undetected.cpp:9:12: warning: variable 'result' may be uninitialized when
      used here [-Wconditional-uninitialized]
    return result;
/tmp/undetected.cpp:6:17: note: initialize the variable 'result' to silence
    char *result;
                 = 0
1 warning generated.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131118/26931852/attachment.html>

More information about the llvm-bugs mailing list