]> Savannah Git Hosting - gnulib.git/commitdiff
libc-config: Improve comments.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Aug 2020 13:45:48 +0000 (15:45 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Aug 2020 13:45:48 +0000 (15:45 +0200)
* lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we
cannot use clang's __diagnose_if__ here.

ChangeLog
lib/cdefs.h

index 3d83db226fdf239463c82e5407b368d85cda00ba..5ff9ccf6efe97a332a3d779a797ad50aaa02caf4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-23  Bruno Haible  <bruno@clisp.org>
+
+       libc-config: Improve comments.
+       * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we
+       cannot use clang's __diagnose_if__ here.
+
 2020-08-22  Bruno Haible  <bruno@clisp.org>
 
        verify: Do use __builtin_assume on clang.
index 32a2c40c6517fbae58e4cb7c1110f37baf9eb5c7..1ae9ffc7747942743fb58045876dda625b858490 100644 (file)
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
 # define __errordecl(name, msg) \
   extern void name (void) __attribute__((__error__ (msg)))
-#elif __glibc_clang_has_attribute (__diagnose_if__) && 0 /* fails on Fedora 31 with Clang 9.  */
+#elif __glibc_clang_has_attribute (__diagnose_if__) && 0
+/* These definitions are not enabled, because they produce bogus warnings
+   in the glibc Fortify functions.  These functions are written in a style
+   that works with GCC.  In order to work with clang, these functions would
+   need to be modified.  */
 # define __warndecl(name, msg) \
   extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning")))
 # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning")))