[glib] gatomic: disable GCC extension atomics for clang
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gatomic: disable GCC extension atomics for clang
- Date: Fri, 20 Jun 2014 20:01:24 +0000 (UTC)
commit bef557e55d8ab89b324ff2099b2621254aeb3929
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Jun 20 14:38:45 2014 -0400
gatomic: disable GCC extension atomics for clang
clang defines the macro that we use to test for GCC's extension support
for C11 atomics, but doesn't define the extension in the same way.
Check for clang and disable the macros again if we find it.
https://bugzilla.gnome.org/show_bug.cgi?id=731513
glib/gatomic.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 1c0096a..9d04b1d 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -85,7 +85,7 @@ G_END_DECLS
#if defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
/* We prefer the new C11-style atomic extension of GCC if available */
-#if defined(__ATOMIC_SEQ_CST)
+#if defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
#define g_atomic_int_get(atomic) \
(G_GNUC_EXTENSION ({ \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]