Patches to fix compiler warnings on IA64
Andreas Schwab
schwab@suse.de
Sat Jul 10 19:26:00 GMT 2004
Ulrich Drepper <drepper@redhat.com> writes:
> Thorsten Kukuk wrote:
>
>> * sysdeps/ia64/bits/atomic.h: Cast first argument of
>> __sync_bool_compare_and_swap_si correct to void*.
>
> Why? The prototypes for the functions a question are
>
> extern void __sync_lock_release_si (int *);
> extern void __sync_lock_release_di (long *);
The problem is that you get aliasing warnings if the argument of the
macros is of different type (even if it has the same size). Especially
for atomic_exchange_and_add there is no other way to avoid the warning.
Here is a better change log entry:
* sysdeps/ia64/bits/atomic.h: Cast first argument of
__sync_bool_compare_and_swap_si and
__sync_bool_compare_and_swap_di to void* to avoid aliasing
warnings.
A similar patch has been applied to <ia64intrin.h>.
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."
More information about the Libc-alpha
mailing list