From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16394 invoked by alias); 21 Nov 2013 03:11:34 -0000 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 Received: (qmail 16294 invoked by uid 48); 21 Nov 2013 03:11:29 -0000 From: "vincent-gcc at vinc17 dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning Date: Thu, 21 Nov 2013 03:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 3.4.2 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: minor X-Bugzilla-Who: vincent-gcc at vinc17 dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02083.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D19430 --- Comment #18 from Vincent Lef=C3=A8vre -= -- This seems to be fixed in the trunk. >>From gcc-bugs-return-435307-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 21 03:12:33 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 17483 invoked by alias); 21 Nov 2013 03:12:32 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 17433 invoked by uid 48); 21 Nov 2013 03:12:29 -0000 From: "vincent-gcc at vinc17 dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59225] New: missing maybe uninitialized warning following single if Date: Thu, 21 Nov 2013 03:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: vincent-gcc at vinc17 dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02084.txt.bz2 Content-length: 1009 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59225 Bug ID: 59225 Summary: missing maybe uninitialized warning following single if Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vincent-gcc at vinc17 dot net With: * gcc-4.8 (Debian 4.8.2-5) 4.8.2 * gcc (Debian 20131021-1) 4.9.0 20131021 (experimental) [trunk revision 203899] xvii:~> cat tst1.c int foo (int x) { int y; if (x == 0) y = 1; return y; } "gcc-snapshot -O2 -Wuninitialized -c tst1.c" doesn't emit any warning. If I change the code to: xvii:~> cat tst2.c int foo (int x) { int y; if (x == 0) y = 1; else if (x == 1) y = 2; return y; } I get the following warning as expected: tst2.c:8:3: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized] return y; ^