From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1838 invoked by alias); 15 Nov 2014 23:11:45 -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 1804 invoked by uid 48); 15 Nov 2014 23:11:42 -0000 From: "anthony.brandon at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/19808] miss a warning about uninitialized member usage in member initializer list in constructor Date: Sat, 15 Nov 2014 23:11: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-Version: 3.4.4 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: anthony.brandon at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: 2014-11/txt/msg01396.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D19808 Anthony Brandon changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anthony.brandon at gmail d= ot com --- Comment #24 from Anthony Brandon --- Hi, > It could be done specifically for uses in mem-initializers by walking the > initializer in perform_mem_init to look for any references to members that > haven't been marked yet. I've been working on this using this approach. At the moment I can detect and give a warning for something like: struct S=20 {=20 int i, j;=20 S() : i(j), j(1) {}=20 };=20 However it doesn't cover cases like i(j+1), and in the case of i(i) there w= ould currently be two warnings (due to -Winit-self). Lastly, the warning is given like so: a.cpp:8:2: warning: =E2=80=98S::i=E2=80=99 is initialized with uninitialize= d field =E2=80=98S::j=E2=80=99 [-Wuninitialized] S() : i(j), j(b) {} ^ So I have a couple of questions: * How to get the right location for the mark. In other words: S() : i(j), j(b) {} ^ * Is there a function to traverse a tree structure looking for a particular tree (or some other way to get things like i(j+1) to work)? * Should this give a warning in the case of i(i)? >>From gcc-bugs-return-466925-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 15 23:21:51 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 13609 invoked by alias); 15 Nov 2014 23:21:51 -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 13278 invoked by uid 48); 15 Nov 2014 23:21:47 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63898] [5 Regression] r217560 caused segfault building 462.libquantum from cpu2006 Date: Sat, 15 Nov 2014 23:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: Message-ID: In-Reply-To: References: 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: 2014-11/txt/msg01397.txt.bz2 Content-length: 143 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63898 --- Comment #1 from Andrew Pinski --- Where is the testcase?