summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2014-07-23 09:27:31 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2014-07-23 09:28:23 -0400
commitd0083f7e2dd621c6b78496bdb6ecf5d580c5e110 (patch)
treeda0c03c715d782bed29d3a62d91e201200d6a5b6
parentd40a2df0886cdd5ba5aabee9e81ab3d3859302d6 (diff)
Revert "gatomic: statically assert that our assumptions hold"
This reverts commit 7269d75321b9d2a967a59fb35f243397f577eb41. Adding G_STATIC_ASSERT() into a header file caused compilation problems with at least one app (Anjuta). Reverting to keep GNOME continuous testing running. https://bugzilla.gnome.org/show_bug.cgi?id=730932
-rw-r--r--glib/gatomic.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 056a51746..9d04b1dfd 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -87,9 +87,6 @@ G_END_DECLS
/* We prefer the new C11-style atomic extension of GCC if available */
#if defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
-/* We use __atomic_load_4, so we rely on this being true */
-G_STATIC_ASSERT (sizeof (gint) == 4);
-
#define g_atomic_int_get(atomic) \
(G_GNUC_EXTENSION ({ \
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
@@ -119,9 +116,6 @@ G_STATIC_ASSERT (sizeof (gint) == 4);
#else /* GLIB_SIZEOF_VOID_P == 8 */
-/* Assume that if GLIB_SIZEOF_VOID_P is not 8, it must be 4 */
-G_STATIC_ASSERT (sizeof (gpointer) == 4);
-
#define g_atomic_pointer_get(atomic) \
(G_GNUC_EXTENSION ({ \
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \