]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Improve support for clang.
authorBruno Haible <bruno@clisp.org>
Fri, 15 Sep 2023 22:27:42 +0000 (00:27 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 15 Sep 2023 22:27:42 +0000 (00:27 +0200)
* gettext-runtime/intl/libgnuintl.in.h (_INTL_MAY_RETURN_STRING_ARG): Use
__attribute__ also for clang.

gettext-runtime/intl/libgnuintl.in.h

index be65ecf47326c1a9e1f61ac20a5b7c5bf98ba3e7..f551c94e64b94053f6b2a7e1c5df8eb8fff6ddae 100644 (file)
@@ -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)