>       Fix "warning: 'format' attribute argument not supported: rpl_printf".
>       * lib/stdio.in.h (printf): Treat clang like GCC.

Similarly, in order to preserve  __attribute__ ((scanf, ....)): 'scanf'
must be mapped to '__scanf__', not 'rpl_scanf'.


2020-08-16  Bruno Haible  <br...@clisp.org>

        stdio: Don't break attribute 'scanf' on clang.
        * lib/stdio.in.h (scanf): Treat clang like GCC.

diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d55ef82..0db5111 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1143,7 +1143,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
 
 #if @GNULIB_SCANF@
 # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-#  if defined __GNUC__
+#  if defined __GNUC__ || defined __clang__
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef scanf
 /* Don't break __attribute__((format(scanf,M,N))).  */


Reply via email to