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


Daniel Jacobowitz <drow@false.org> 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  <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?

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."


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