Disable use of [[deprecated]] with gcc 5

This gcc version claims support for this attribute, but actually doesn't
support it and returns unclear errors when it is used, e.g.

	$ echo '[[deprecated]] int x;' | g++-5 -fsyntax-only -x c++ -
	<stdin>:1:1: error: expected unqualified-id before ‘[’ token

so disable its use with gcc < 6.
This commit is contained in:
Vadim Zeitlin
2021-07-11 15:02:41 +02:00
parent 7a8f2dffbd
commit f6da66debc

View File

@@ -585,7 +585,10 @@ typedef short int WXTYPE;
#if defined(__has_cpp_attribute)
#if __has_cpp_attribute(deprecated)
#define wxHAS_DEPRECATED_ATTR
/* gcc 5 claims to support this attribute, but actually doesn't */
#if !defined(__GNUC__) || wxCHECK_GCC_VERSION(6, 0)
#define wxHAS_DEPRECATED_ATTR
#endif
#endif
#endif