From: Bruno Haible Date: Sun, 23 Aug 2020 13:45:48 +0000 (+0200) Subject: libc-config: Improve comments. X-Git-Tag: v1.0~3687 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c969e86c0ed03b9d1b3b2be3fd4453f552383026;p=gnulib.git libc-config: Improve comments. * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we cannot use clang's __diagnose_if__ here. --- diff --git a/ChangeLog b/ChangeLog index 3d83db226f..5ff9ccf6ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-23 Bruno Haible + + 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 verify: Do use __builtin_assume on clang. diff --git a/lib/cdefs.h b/lib/cdefs.h index 32a2c40c65..1ae9ffc774 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -148,7 +148,11 @@ # 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")))