]> Savannah Git Hosting - gnulib.git/commitdiff
Fix "warning: 'format' attribute argument not supported: rpl_printf".
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 11:00:35 +0000 (13:00 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 11:00:35 +0000 (13:00 +0200)
* lib/stdio.in.h (printf): Treat clang like GCC.

ChangeLog
lib/stdio.in.h

index 3a51cec026bc0271156c913e20d4d19b68fa0123..af210cc93dd0aa4650308461bad8e465200e9e73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
+       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,
index 92192ce4de192ff978afd1b73d31d28727a27235..d55ef8246181543ae9454ecf813facbb40eddf2d 100644 (file)
@@ -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__