glibc -Werror=address build failure for Hurd with mainline GCC
Joseph Myers
joseph@codesourcery.com
Mon Nov 22 18:19:28 GMT 2021
The glibc build with GCC mainline has recently started failing for Hurd:
report-wait.c: In function '_S_msg_report_wait':
report-wait.c:129:12: error: the address of '_hurd_itimer_thread' will always evaluate as 'true' [-Werror=address]
129 | else if (&_hurd_itimer_thread && thread == _hurd_itimer_thread)
| ^
This seems like a valid warning (the compiler can see the address can't be
NULL), given the #if 0 above (but maybe the right fix depends on whether
you want to keep the #if 0, and so keep it clear what would need to change
if the #if 0 changed, or remove it):
#if 0 /* libc.so.0.0 needs this defined, so make it a weak alias for now. */
extern thread_t _hurd_itimer_thread; /* XXX */
weak_extern (_hurd_itimer_thread)
#else
static thread_t default_hurd_itimer_thread;
weak_alias (default_hurd_itimer_thread, _hurd_itimer_thread)
#endif
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list