gmacros: Only use deprecated attributes on enumerators with GCC ≥ 6.1

The reference I found online which said they were supported by GCC ≥ 5.2
was obviously lying.

The GCC 6.1.0 documentation says they’re supported:
https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Enumerator-Attributes.html.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-06-14 13:23:16 +01:00
parent fa5996927f
commit dddcf90dda

View File

@ -988,7 +988,7 @@
#endif
#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \
(__GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 2) || \
(__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1) || \
__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0))
#define GLIB_DEPRECATED_ENUMERATOR G_DEPRECATED
#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) G_DEPRECATED_FOR(f)