diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-11-14 10:27:50 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-11-14 10:29:53 -0800 |
commit | 5a8a1598e1243599feb302f0f75d947553f2918f (patch) | |
tree | af9240b42b69c7a277386385ad295cbfbe894f41 /lib/careadlinkat.c | |
parent | cfe65a87342f6816d3c12f008cc0adff60a2c190 (diff) | |
download | gnulib-5a8a1598e1243599feb302f0f75d947553f2918f.tar.gz |
careadlinkat: warn better about GCC bug 93644
* lib/careadlinkat.c (readlink_stk): When --enable-gcc-warnings is
not in effect, use "#warning" to let builders know more clearly
about GCC bug 93644, because the bug triggers even if no -W option
is given to GCC.
Diffstat (limited to 'lib/careadlinkat.c')
-rw-r--r-- | lib/careadlinkat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index e43aa42d5c..79cc3b3a0a 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -51,8 +51,13 @@ enum { STACK_BUF_SIZE = 1024 }; to pacify GCC is known; even an explicit #pragma does not pacify GCC. When the GCC bug is fixed this workaround should be limited to the broken GCC versions. */ -#if (defined GCC_LINT || defined lint) && _GL_GNUC_PREREQ (10, 1) +#if _GL_GNUC_PREREQ (10, 1) +# if defined GCC_LINT || defined lint __attribute__ ((__noinline__)) +# elif __OPTIMIZE__ && !__NO_INLINE__ +# warning "GCC might issue a bogus -Wreturn-local-addr warning here." +# warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." +# endif #endif static char * readlink_stk (int fd, char const *filename, |