>From 937f11ec8082c1a6a89dd7ca1b771c7bde7ea152 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Aug 2020 13:00:35 +0200 Subject: [PATCH 03/13] Fix "warning: 'format' attribute argument not supported: rpl_printf". * lib/stdio.in.h (printf): Treat clang like GCC. --- ChangeLog | 3 +++ lib/stdio.in.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3a51cec..af210cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2020-08-16 Bruno Haible + Fix "warning: 'format' attribute argument not supported: rpl_printf". + * lib/stdio.in.h (printf): Treat clang like GCC. + Fix "warning: attribute declaration must precede definition" with clang. * lib/math.in.h (acosl, asinl, atanl, ceill, cosl, expl, fabsf, fabsl, floorl, fmodl, frexpf, frexpl, hypotf, hypotl, ldexpf, ldexpl, logl, diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 92192ce..d55ef82 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -964,7 +964,7 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ -- 2.7.4