This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH roland/arm-atomic-warn] Fiddle ARM atomic.h to avoid -Wvolatile-register-var warnings.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: libc-ports at sourceware dot org
- Date: Wed, 8 Aug 2012 15:13:02 -0700 (PDT)
- Subject: Re: [PATCH roland/arm-atomic-warn] Fiddle ARM atomic.h to avoid -Wvolatile-register-var warnings.
- References: <20120808204442.9B9F82C085@topped-with-meat.com> <5022E1E4.7040801@twiddle.net>
> Is it really worth working so hard to avoid the gcc builtins?
> Yes, gcc before 4.7 doesn't have __atomic to avoid the extra
> barriers, but at least 4.7 and later will.
That file uses them #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.
I was just killing a warning without worrying about why the code
path was being used.
> May I ask what gcc version you're targeting, anyway?
I'm using today's trunk, cross --target=arm-linux-gnueabi and no other
special options. I don't know why __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is
not defined. Probably it would be with appropriate -march= settings.
Thanks,
Roland