https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123115
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So do we want something like
--- gcc/defaults.h.jj 2025-08-05 08:19:26.667814010 +0200
+++ gcc/defaults.h 2025-12-14 20:42:54.704690351 +0100
@@ -390,7 +390,7 @@ see the files COPYING3 and COPYING.RUNTI
/* Provide defaults for stuff that may not be defined when using
sjlj exceptions. */
#ifndef EH_RETURN_DATA_REGNO
-#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
+#define EH_RETURN_DATA_REGNO(N) ((N) == INVALID_REGNUM ? (N) : INVALID_REGNUM)
#endif
/* Offset between the eh handler address and entry in eh tables. */
so that N is always used even on targets which don't care?
Though this might result in a warning if N is signed.
Maybe ((N) ? INVALID_REGNUM : INVALID_REGNUM + (N))