https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093
--- Comment #54 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Hmm, I see. What I am trying to accomplish is, put the target attribute on every function that calls directly or in-directly to CONTINUE_UNWINDING. And do that only for ARM. For gdc_personality it is straight forward to do, as you pointed out. But for __gdc_personality and scanLSDA what I would like to do is static if (GNU_ARM_EABI_Unwinder) { @attribute("target", ("general-regs-only")) } private _Unwind_Reason_Code __gdc_personality(_Unwind_Action actions, _Unwind_Exception_Class exceptionClass, _Unwind_Exception* unwindHeader, _Unwind_Context* context) { ... but that does not work, what would work is static if (GNU_ARM_EABI_Unwinder) { @attribute("target", ("general-regs-only")) private _Unwind_Reason_Code __gdc_personality(_Unwind_Action actions, _Unwind_Exception_Class exceptionClass, _Unwind_Exception* unwindHeader, _Unwind_Context* context) { ... } } else { private _Unwind_Reason_Code __gdc_personality(_Unwind_Action actions, _Unwind_Exception_Class exceptionClass, _Unwind_Exception* unwindHeader, _Unwind_Context* context) { ... } } duplicating all that code is of course not an option.