* glibc -Werror=address build failure for Hurd with mainline GCC
@ 2021-11-22 18:19 Joseph Myers
2021-11-28 20:28 ` Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2021-11-22 18:19 UTC (permalink / raw)
To: libc-alpha, samuel.thibault
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: glibc -Werror=address build failure for Hurd with mainline GCC
2021-11-22 18:19 glibc -Werror=address build failure for Hurd with mainline GCC Joseph Myers
@ 2021-11-28 20:28 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2021-11-28 20:28 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha
Hello,
Joseph Myers, le lun. 22 nov. 2021 18:19:28 +0000, a ecrit:
> 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):
It seems the #if 0 is outdated, I have removed it.
Thanks!
Samuel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-28 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 18:19 glibc -Werror=address build failure for Hurd with mainline GCC Joseph Myers
2021-11-28 20:28 ` Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).