This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix aliasing violations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]