[Bug c/54554] Undetected use of uninitialized variable

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 9 11:04:00 GMT 2014


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

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Dimitris Papavasiliou from comment #6)
> I don't mean to dictate the coding-style others should use of course but
> still it seems to me like a small price to pay for avoiding obscure
> stochastic bugs that can take hours of debugging to locate (especially given
> the fact that there's good reason to disable optimizations when debugging
> code).

It should be possible to run the pass that triggers -Wmaybe-uninitialized
warning without optimization, but it will be very noisy. You could explore the
option of keeping it disabled at -O0 unless the user requests it by an explicit
-Wmaybe-uninitialized. But you should run some tests to see how noisy/useful
that would be. My guess is that a lot more noisy than useful.


More information about the Gcc-bugs mailing list