[Bug c/44511] Misdetects missing return with non-void return type, but only if the function is static
eggert at cs dot ucla.edu
gcc-bugzilla@gcc.gnu.org
Sun Nov 22 02:18:41 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511
eggert at cs dot ucla.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eggert at cs dot ucla.edu
--- Comment #4 from eggert at cs dot ucla.edu ---
We recently ran into this bug in Gnulib, and this affects downstream GNU test
programs with threads that never return, because POSIX thread functions return
'void *'. For example, with GNU grep 3.6, './configure --enable-gcc-warnings;
make' fails to build; see:
https://bugs.gnu.org/44535
I worked around the problem by adding '#pragma GCC diagnostic ignored
"-Wreturn-type"' to the Gnulib test module in question. It would be nice if
such a workaround weren't needed.
More information about the Gcc-bugs
mailing list