From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14997 invoked by alias); 11 Sep 2014 22:02:57 -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 14968 invoked by uid 48); 11 Sep 2014 22:02:53 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63233] Missing Warray-bounds warning for array within struct Date: Thu, 11 Sep 2014 22:02: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: 4.9.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: major X-Bugzilla-Who: manu at gcc dot gnu.org 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: keywords bug_status cf_reconfirmed_on cc resolution short_desc everconfirmed 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-09/txt/msg01457.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63233 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|RESOLVED |NEW Last reconfirmed| |2014-09-11 CC| |manu at gcc dot gnu.org Resolution|INVALID |--- Summary|Valid out of bounds access |Missing Warray-bounds |leads to undefined behavior |warning for array within | |struct Ever confirmed|0 |1 --- Comment #2 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- This should be warned by Warray-bounds. Clang warns even at -O0, so this ca= se can even be warned in the FE: test.c:10:3: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] foo.a[1] =3D 99; ^ ~ test.c:2:3: note: array 'a' declared here int a[1]; ^ test.c:12:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] return foo.a[1]; ^ ~ test.c:2:3: note: array 'a' declared here int a[1]; ^ >>From gcc-bugs-return-461624-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Sep 11 22:11:35 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 20373 invoked by alias); 11 Sep 2014 22:11:35 -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 20345 invoked by uid 48); 11 Sep 2014 22:11:31 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63233] Missing Warray-bounds warning for array within struct Date: Thu, 11 Sep 2014 22: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: 4.9.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: major X-Bugzilla-Who: manu at gcc dot gnu.org 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: 2014-09/txt/msg01458.txt.bz2 Content-length: 523 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63233 --- Comment #3 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Andrew Pinski from comment #1) > This is not a valid out of bounds access in C. Sometime it might be better to acknowledge where GCC could help rather than simply close the bug saying to users "you are wrong". Who knows, some user = may decide to implement a fix themselves. We all know that GCC is in need of all the help it can get to not be completely left behind. >>From gcc-bugs-return-461625-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Sep 11 22:12:37 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21236 invoked by alias); 11 Sep 2014 22:12:37 -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 21212 invoked by uid 48); 11 Sep 2014 22:12:32 -0000 From: "pangbw at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63234] New: arm used label is removed Date: Thu, 11 Sep 2014 22:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pangbw at gmail dot com 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: 2014-09/txt/msg01459.txt.bz2 Content-length: 373 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63234 Bug ID: 63234 Summary: arm used label is removed Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pangbw at gmail dot com