]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl.h: require gcc 12.1 for the deprecation magic
authorDaniel Stenberg <daniel@haxx.se>
Fri, 17 Mar 2023 13:48:18 +0000 (14:48 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 17 Mar 2023 16:52:48 +0000 (17:52 +0100)
Reported-by: kchow-FTNT on github
Fixes #10726
Closes #10784

include/curl/curl.h

index 8cc0b6ffe33abdb8c29f6edd20ceff757e96c7ee..63a13823e1595d8a5c22f2c7484d271c14f2e28b 100644 (file)
 #endif
 
 /* Compile-time deprecation macros. */
-#if defined(__GNUC__) && (__GNUC__ >= 6) &&                             \
+#if defined(__GNUC__) &&                                                \
+  ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) &&  \
   !defined(__INTEL_COMPILER) &&                                         \
   !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
-#define CURL_DEPRECATED(version, message) \
-    __attribute__((deprecated("since " # version ". " message)))
+#define CURL_DEPRECATED(version, message)                       \
+  __attribute__((deprecated("since " # version ". " message)))
 #define CURL_IGNORE_DEPRECATION(statements) \
       _Pragma("GCC diagnostic push") \
       _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \