From: Daniel Stenberg Date: Fri, 17 Mar 2023 13:48:18 +0000 (+0100) Subject: curl.h: require gcc 12.1 for the deprecation magic X-Git-Tag: curl-8_0_0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3f3c2557c64d4947f8c6337a0590cd28304d8fd;p=thirdparty%2Fcurl.git curl.h: require gcc 12.1 for the deprecation magic Reported-by: kchow-FTNT on github Fixes #10726 Closes #10784 --- diff --git a/include/curl/curl.h b/include/curl/curl.h index 8cc0b6ffe3..63a13823e1 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -34,11 +34,12 @@ #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\"") \