]> Savannah Git Hosting - gnulib.git/commitdiff
stdio: Don't break attribute 'scanf' on clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 16:47:47 +0000 (18:47 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 16:47:47 +0000 (18:47 +0200)
* lib/stdio.in.h (scanf): Treat clang like GCC.

ChangeLog
lib/stdio.in.h

index 46a0d6c5aec4c2da6d72a1e15906ec02ea292fec..e26dbd8d30f2c019349a2225d3fa7255774ce38a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        Use __restrict also on clang.
index d55ef8246181543ae9454ecf813facbb40eddf2d..0db5111a04500e6556dd6ba524d6c6984b5c0666 100644 (file)
@@ -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))).  */