From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31852 invoked by alias); 4 Jan 2013 14:50:50 -0000 Received: (qmail 31804 invoked by uid 48); 4 Jan 2013 14:50:34 -0000 From: "dpapavas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/54554] Undetected use of uninitialized variable Date: Fri, 04 Jan 2013 14:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dpapavas at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00320.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54554 --- Comment #6 from Dimitris Papavasiliou 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).