diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-08-17 14:45:38 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-08-17 14:58:05 -0700 |
commit | a1433e1b1f692c6ae062305d4c683efafb087b38 (patch) | |
tree | 6f21620eae725c5b7821c0d139575b9af03bf20f /lib/cdefs.h | |
parent | 2a3468c9f263596815a3383c0157ba9a81cf2d24 (diff) | |
download | gnulib-a1433e1b1f692c6ae062305d4c683efafb087b38.tar.gz |
libc-config: avoid Clang’s __diagnose_if__
* lib/cdefs.h (__warndecl, __warnattr, __errordecl):
For now, do not use __diagnose_if__ here, as this fails
on Fedora 31 with Clang 9.0.1, with diagnostic
"/usr/include/bits/stdio2.h:263:9: error: fgets called with bigger
size than length of destination buffer
[-Werror,-Wuser-defined-warnings]". I guess Clang 9 warns even
for functions that are not called?
Diffstat (limited to 'lib/cdefs.h')
-rw-r--r-- | lib/cdefs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cdefs.h b/lib/cdefs.h index 74da73404b..32a2c40c65 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -148,7 +148,7 @@ # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) -#elif __glibc_clang_has_attribute (__diagnose_if__) +#elif __glibc_clang_has_attribute (__diagnose_if__) && 0 /* fails on Fedora 31 with Clang 9. */ # define __warndecl(name, msg) \ extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning"))) # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) |