From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 965 invoked by alias); 30 Oct 2008 22:46:34 -0000 Received: (qmail 5469 invoked by uid 48); 30 Oct 2008 22:44:20 -0000 Date: Thu, 30 Oct 2008 22:46:00 -0000 Message-ID: <20081030224419.5466.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/35652] [4.2/4.3/4.4 Regression] offset warning should be given in the front-end In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" 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: 2008-10/txt/msg02031.txt.bz2 ------- Comment #7 from manu at gcc dot gnu dot org 2008-10-30 22:44 ------- The location info seems to be fixed in mainline. Nonetheless, I agree completely with Richard. This warning belongs in the front-end. Moreover we fail to diagnose: const char *s = 'x' + "y"; in both C and C++. Also, this warning does not really requires -O2, so it should work at -O0 too. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org Summary|[4.2/4.3/4.4 Regression] |[4.2/4.3/4.4 Regression] |Location information |offset warning should be |incorrect on string bounds |given in the front-end |warning | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35652