diff --git a/glib/gmacros.h b/glib/gmacros.h index 218ee4f25..d4e5124cf 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -235,11 +235,6 @@ * * Since: 2.58 */ -/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_58 because it’s - * used within the GLib headers in function declarations which are always - * evaluated when a header is included. This results in warnings in third party - * code which includes glib.h, even if the third party code doesn’t use the new - * macro itself. */ #if g_macro__has_attribute(__pure__) #define G_GNUC_PURE __attribute__((__pure__)) @@ -254,9 +249,11 @@ #endif #if g_macro__has_attribute(__noinline__) -#define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) +#define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) \ + GLIB_AVAILABLE_MACRO_IN_2_58 #else -#define G_GNUC_NO_INLINE +#define G_GNUC_NO_INLINE \ + GLIB_AVAILABLE_MACRO_IN_2_58 #endif /** diff --git a/gobject/gtype.h b/gobject/gtype.h index 73d665626..85c5ea2fc 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -2158,7 +2158,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } /* closes type_name##_get_type() */ \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2327,7 +2327,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2364,7 +2364,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2417,7 +2417,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \