https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116481

--- Comment #7 from Bruno Haible <bruno at clisp dot org> ---
(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 .

Reply via email to