G_GNUC_ALLOC_SIZE2
G_GNUC_DEPRECATED
G_GNUC_DEPRECATED_FOR
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+G_GNUC_END_IGNORE_DEPRECATIONS
G_GNUC_NORETURN
G_GNUC_UNUSED
G_GNUC_PRINTF
/* GDesktopAppInfoLookup interface: */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
typedef GDesktopAppInfoLookupIface GDesktopAppInfoLookupInterface;
G_DEFINE_INTERFACE (GDesktopAppInfoLookup, g_desktop_app_info_lookup, G_TYPE_OBJECT)
*
* Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
GAppInfo *
g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
const char *uri_scheme)
return (* iface->get_default_for_uri_scheme) (lookup, uri_scheme);
}
-#pragma GCC diagnostic pop
+
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
void
_g_io_modules_ensure_extension_points_registered (void)
{
#ifdef G_OS_UNIX
#if !GLIB_CHECK_VERSION (3, 0, 0)
ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP);
+ G_GNUC_END_IGNORE_DEPRECATIONS
#endif
#endif
G_UNLOCK (registered_extensions);
}
-#pragma GCC diagnostic pop
void
_g_io_modules_ensure_loaded (void)
*/
/**
+ * G_GNUC_BEGIN_IGNORE_DEPRECATIONS:
+ *
+ * Tells <command>gcc</command> (if it is a new enough version) to
+ * temporarily stop emitting warnings when functions marked with
+ * %G_GNUC_DEPRECATED or %G_GNUC_DEPRECATED_FOR are called. This is
+ * useful for when you have one deprecated function calling another
+ * one, or when you still have regression tests for deprecated
+ * functions.
+ *
+ * Use %G_GNUC_END_IGNORE_DEPRECATIONS to begin warning again. (If you
+ * are not compiling with <literal>-Wdeprecated-declarations</literal>
+ * then neither macro has any effect.)
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+/**
+ * G_GNUC_END_IGNORE_DEPRECATIONS:
+ *
+ * Undoes the effect of %G_GNUC_BEGIN_IGNORE_DEPRECATIONS, telling
+ * <command>gcc</command> to begin outputting warnings again
+ * (assuming those warnings had been enabled to begin with).
+ *
+ * This macro can be used either inside or outside of a function body,
+ * but must appear on a line by itself.
+ *
+ * Since: 2.32
+ */
+
+/**
* G_GNUC_NORETURN:
*
* Expands to the GNU C <literal>noreturn</literal> function attribute
#define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED
#endif /* __GNUC__ */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+#define G_GNUC_END_IGNORE_DEPRECATIONS \
+ _Pragma ("GCC diagnostic pop")
+#else
+#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+#define G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define G_GNUC_MAY_ALIAS __attribute__((may_alias))
#else
{
g_return_val_if_fail (value_array != NULL, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_value_array_insert (value_array, 0, value);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
{
g_return_val_if_fail (value_array != NULL, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_value_array_insert (value_array, value_array->n_values, value);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/**