[LLVMbugs] [Bug 17940] Undetected use of uninitialised variable (detected at -O2 -Wall by gcc)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 15 12:17:26 PST 2013


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Note that GCC's warning says "may be used uninitialized", not "is used
uninitialized". The clang warning flag for that is -Wconditional-uninitialized.
That gives:

<stdin>:9:12: warning: variable 'result' may be uninitialized when used here
[-Wconditional-uninitialized]
    return result;
           ^~~~~~
<stdin>:6:17: note: initialize the variable 'result' to silence this warning
    char *result;
                ^
                 = 0

llvm-g++ is not supported, so we don't care what it does here.

-- 
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/20131115/8cf731f2/attachment.html>


More information about the llvm-bugs mailing list