From: Bruno Haible Date: Sun, 16 Aug 2020 11:00:35 +0000 (+0200) Subject: Fix "warning: 'format' attribute argument not supported: rpl_printf". X-Git-Tag: v1.0~3746 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=937f11ec8082c1a6a89dd7ca1b771c7bde7ea152;p=gnulib.git Fix "warning: 'format' attribute argument not supported: rpl_printf". * lib/stdio.in.h (printf): Treat clang like GCC. --- diff --git a/ChangeLog b/ChangeLog index 3a51cec026..af210cc93d 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 92192ce4de..d55ef82461 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__