https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093
--- Comment #56 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Can't you just add prototypes? Like: 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); } etc. before the actual definitions? attribute ("", ("")) seems ugly.