This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Fix aliasing violations
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 23 Oct 2004 14:37:29 -0400
- Subject: Re: Fix aliasing violations
- References: <jebretffzf.fsf@sykes.suse.de>
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 <schwab@suse.de>
>
> * 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? This patch is OK.
--
Daniel Jacobowitz