From: Joseph Chen Date: Wed, 22 May 2024 07:35:31 +0000 (+0800) Subject: build: add more supported attributes to the IAR compiler X-Git-Tag: curl-8_9_0~399 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=767909be08b2758bc197e53fe22551594032f999;p=thirdparty%2Fcurl.git build: add more supported attributes to the IAR compiler Closes #13744 --- diff --git a/include/curl/curl.h b/include/curl/curl.h index 91e11f62d1..2e57cd8446 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -34,17 +34,25 @@ #endif /* Compile-time deprecation macros. */ -#if defined(__GNUC__) && \ - ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) && \ +#if (defined(__GNUC__) && \ + ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) || \ + defined(__IAR_SYSTEMS_ICC__)) && \ !defined(__INTEL_COMPILER) && \ !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL) #define CURL_DEPRECATED(version, message) \ __attribute__((deprecated("since " # version ". " message))) +#if defined(__IAR_SYSTEMS_ICC__) +#define CURL_IGNORE_DEPRECATION(statements) \ + _Pragma("diag_suppress=Pe1444") \ + statements \ + _Pragma("diag_default=Pe1444") +#else #define CURL_IGNORE_DEPRECATION(statements) \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ statements \ _Pragma("GCC diagnostic pop") +#endif #else #define CURL_DEPRECATED(version, message) #define CURL_IGNORE_DEPRECATION(statements) statements diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h index 4f704548d1..e6bc5bca47 100644 --- a/include/curl/mprintf.h +++ b/include/curl/mprintf.h @@ -32,7 +32,8 @@ extern "C" { #endif -#if (defined(__GNUC__) || defined(__clang__)) && \ +#if (defined(__GNUC__) || defined(__clang__) || \ + defined(__IAR_SYSTEMS_ICC__)) && \ defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ !defined(CURL_NO_FMT_CHECKS) #if defined(__MINGW32__) && !defined(__clang__)