mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Revert "gatomic: statically assert that our assumptions hold"
This reverts commit 7269d75321
.
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
This commit is contained in:
parent
d40a2df088
commit
d0083f7e2d
@ -87,9 +87,6 @@ G_END_DECLS
|
|||||||
/* We prefer the new C11-style atomic extension of GCC if available */
|
/* We prefer the new C11-style atomic extension of GCC if available */
|
||||||
#if defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
|
#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) \
|
#define g_atomic_int_get(atomic) \
|
||||||
(G_GNUC_EXTENSION ({ \
|
(G_GNUC_EXTENSION ({ \
|
||||||
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
|
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
|
||||||
@ -119,9 +116,6 @@ G_STATIC_ASSERT (sizeof (gint) == 4);
|
|||||||
|
|
||||||
#else /* GLIB_SIZEOF_VOID_P == 8 */
|
#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) \
|
#define g_atomic_pointer_get(atomic) \
|
||||||
(G_GNUC_EXTENSION ({ \
|
(G_GNUC_EXTENSION ({ \
|
||||||
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
|
G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \
|
||||||
|
Loading…
Reference in New Issue
Block a user