[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: improve clang support (33)
From: |
Bruno Haible |
Subject: |
Re: improve clang support (33) |
Date: |
Sun, 16 Aug 2020 18:48:14 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; ) |
> 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 <bruno@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))). */