From ea3ddd208d67d8a7683450a8e7b56a47721cbdc8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 16 Sep 2023 00:27:42 +0200 Subject: [PATCH] intl: Improve support for clang. * gettext-runtime/intl/libgnuintl.in.h (_INTL_MAY_RETURN_STRING_ARG): Use __attribute__ also for clang. --- gettext-runtime/intl/libgnuintl.in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h index be65ecf47..f551c94e6 100644 --- a/gettext-runtime/intl/libgnuintl.in.h +++ b/gettext-runtime/intl/libgnuintl.in.h @@ -111,7 +111,7 @@ extern int libintl_version; /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return its n-th argument literally. This enables GCC to warn for example about printf (gettext ("foo %y")). */ -#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) +#if ((defined __GNUC__ && __GNUC__ >= 3) || defined __clang__) && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) #else # define _INTL_MAY_RETURN_STRING_ARG(n) -- 2.47.3