[Bug middle-end/49754] Wuninitialized does not work with structs/unions/arrays
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 4 08:23:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49754
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-04
CC| |manu at gcc dot gnu.org
Component|c |middle-end
Summary|Let gcc warn about all |Wuninitialized does not
|uninitialized variables |work with
| |structs/unions/arrays
Ever Confirmed|0 |1
--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-04 08:23:24 UTC ---
This is a problem of representation. Struct/unions/arrays are represented as
memory operations, and Wuninitialized does not (generally) work on them. It may
warn in some corner cases if the accesses can be converted into scalar
variables, but in general it doesn't work.
I am not even sure if the current middle-end representation can tell whether
the memory is uninitialized and never initialized up to the point of use. That
would be the first thing to implement.
More information about the Gcc-bugs
mailing list