https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116481
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #8 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Bruno Haible from comment #7)
> (In reply to Richard Biener from comment #6)
> > For portability you likely want to convert the function pointer to uintptr_t
> > and only that to char */long *. That might also avoid GCCs diagnostic.
>
> Thanks for the attempted advice. But, no, converting a pointer to uintptr_t
> and later back to a pointer is bad for portability: It does not work on the
> CHERI architecture and its implementation on the ARM Morello chip
> https://developer.arm.com/Architectures/Morello, because it loses the tag
> bits that are essential for accessing the pointer. See
> https://www.gnu.org/software/gnulib/manual/html_node/C99-features-avoided.
> html and https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00021.html
> .
Related to the CHERI part: bug 111908