Created
June 17, 2025 12:02
-
-
Save torarnv/f9b2f28ff07b98bf23660179c1e54610 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/src/corelib/global/qcompilerdetection.h w/src/corelib/global/qcompilerdetection.h | |
index 700c59ab3c7..20b3f872f5d 100644 | |
--- i/src/corelib/global/qcompilerdetection.h | |
+++ w/src/corelib/global/qcompilerdetection.h | |
@@ -999,8 +999,11 @@ | |
# define Q_NORETURN [[noreturn]] | |
#endif | |
-#if (defined(__cplusplus) && __has_cpp_attribute(deprecated)) || \ | |
- (!defined(__cplusplus) && __has_c_attribute(deprecated)) | |
+ | |
+#if ((defined(__cplusplus) && __has_cpp_attribute(deprecated)) || \ | |
+ (!defined(__cplusplus) && __has_c_attribute(deprecated))) \ | |
+ /* GCC 12 and earlier has issues combining __attribute__ and [[]] syntax */ \ | |
+ && (!defined(Q_CC_GNU_ONLY) || Q_CC_GNU >= 1300) | |
# ifdef Q_DECL_DEPRECATED | |
# undef Q_DECL_DEPRECATED | |
# endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment