[LLVMbugs] [Bug 16054] Missing "uninitialized" warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 12 11:50:02 PDT 2013


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Fixed in r190623.

<stdin>:1:16: warning: variable 'cond' is used uninitialized whenever function
'f' is called [-Wsometimes-uninitialized]
void f() { int cond; while (cond != 0) { (void)&cond; } }
           ~~~~^~~~
<stdin>:1:29: note: uninitialized use occurs here
void f() { int cond; while (cond != 0) { (void)&cond; } }
                            ^~~~
<stdin>:1:20: note: initialize the variable 'cond' to silence this warning
void f() { int cond; while (cond != 0) { (void)&cond; } }
                   ^
                    = 0

-- 
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/20130912/f092ff48/attachment.html>


More information about the llvm-bugs mailing list