This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Remove miscellaneous GCC >= 4.7 version conditionals


On 10/28/2015 06:45 PM, Joseph Myers wrote:
> -#elif defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
> -/* Atomic compare and exchange.  */
> -# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
> -  __sync_val_compare_and_swap ((mem), (oldval), (newval))
>  #else
>  # define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
>    __arm_assisted_compare_and_exchange_val_32_acq ((mem), (newval), (oldval))
>  #endif
>  
> -#if !__GNUC_PREREQ (4, 7) || !defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
> +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4

Can you merge the #ifndef into the preceding #else block?  I think this
was done this way to avoid duplication, but it's not necessary anymore.

The x86 bits look okay.

Florian


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