[Bug c/42884] GCC (v4.3.3) fails to detect uninitialized variable

tstdenis at elliptictech dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 27 16:22:00 GMT 2010



------- Comment #15 from tstdenis at elliptictech dot com  2010-01-27 16:22 -------
(In reply to comment #14)
> As diglen has its address taken and we do not warn about uninitialized use
> of memory we do not warn.
> 

I get that the compiler can't track if an external function actually
initializes a value through a pointer, but the "diglen = sizeof..." line should
be good enough for the positive case.  In the false path though "diglen" is not
initialized nor its address taken.


-- 

tstdenis at elliptictech dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42884



More information about the Gcc-bugs mailing list