This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/54554] Undetected use of uninitialized variable


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

--- Comment #6 from Dimitris Papavasiliou <dpapavas at gmail dot com> 2013-01-04 14:50:32 UTC ---
Well this seems to be a core decision regarding the way GCC warnings work
(which probably has more far-reaching consequences) but just for the sake of
argument, I don't see why people should complain even in such a case.  The only
use I can think of for code such as the above is temporarily switching of a
statement but, apart from the fact that this can be more efficiently done with
preprocessor directives, the thing is that temporarily disabling a statement in
this way is meaningful if it is expected that it will be re-enabled at some
time in the future.  If that would lead to broken code there's not much of a
point.

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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]