From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8980 invoked by alias); 5 Dec 2010 07:08:05 -0000 Received: (qmail 8934 invoked by uid 22791); 5 Dec 2010 07:08:04 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_RW,TW_SV,TW_WG X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 05 Dec 2010 07:07:59 +0000 From: "rwgk at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/46759] incorrect array bounds warning? 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: minor X-Bugzilla-Who: rwgk at yahoo 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-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 Date: Sun, 05 Dec 2010 07:08:00 -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 X-SW-Source: 2010-12/txt/msg00452.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46759 --- Comment #4 from rwgk at yahoo dot com 2010-12-05 06:14:35 UTC --- Created attachment 22639 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22639 reproducer for similar warning from gcc 4.6 I'm getting a similar warning with g++ from the current svn trunk: svn trunk rev. 167466 g++ (GCC) 4.6.0 20101205 (experimental) % g++ -Wall -O3 pr46759_bounds_warning_2.cpp pr46759_bounds_warning_2.cpp: In function 'int main()': pr46759_bounds_warning_2.cpp:11:3: warning: array subscript is above array bounds [-Warray-bounds] The reproducer is attached. g++ 4.5.1 doesn't emit a warning. Would it be better to file this as a new bug?