From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28793 invoked by alias); 23 Oct 2004 19:08:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28776 invoked from network); 23 Oct 2004 19:08:41 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 23 Oct 2004 19:08:41 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 5251EE28926 for ; Sat, 23 Oct 2004 21:07:09 +0200 (CEST) To: gdb-patches@sources.redhat.com Subject: Re: Fix aliasing violations References: <20041023183729.GA4783@nevyn.them.org> From: Andreas Schwab X-Yow: I know th'MAMBO!! I have a TWO-TONE CHEMISTRY SET!! Date: Sat, 23 Oct 2004 19:08:00 -0000 In-Reply-To: <20041023183729.GA4783@nevyn.them.org> (Daniel Jacobowitz's message of "Sat, 23 Oct 2004 14:37:29 -0400") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-10/txt/msg00387.txt.bz2 Daniel Jacobowitz writes: > On Sat, Oct 23, 2004 at 08:26:28PM +0200, Andreas Schwab wrote: >> The macro GROW_VECT in ada-lang.h violates the C aliasing rules. >> >> Andreas. >> >> 2004-10-23 Andreas Schwab >> >> * ada-lang.c (grow_vect): Return the new array instead of >> expecting pointer to pointer to avoid violation of aliasing rules. >> * ada-lang.h (GROW_VECT): Adapt call to grow_vect. > > I assume newer versions of GCC warn about this? Yes, that's -Wstrict-aliasing, part of -Wall. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."