On Thu, Jan 18, 2024 at 02:59:23PM +0000, Iain Sandoe wrote: > --- a/gcc/builtins.cc > +++ b/gcc/builtins.cc > @@ -8416,6 +8416,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, > machine_mode mode, > case BUILT_IN_ADJUST_DESCRIPTOR: > return expand_builtin_adjust_descriptor (exp); > > + case BUILT_IN_NESTED_PTR_CREATED: > + case BUILT_IN_NESTED_PTR_DELETED:
Unsure if it is ok to have the BUILT_IN_ names so different from the actual functions, if they shouldn't be BUILT_IN_GCC_NESTED_FUNC_PTR_{CREATED,DELETED} instead. The missing __ is what happens even with BUILT_IN_CLEAR_CACHE / __clear_cache. > + break; /* At present, no expansion, just call the function. */ > + > + Just one empty newline, not 2. > case BUILT_IN_FORK: > case BUILT_IN_EXECL: > case BUILT_IN_EXECV: > diff --git a/gcc/builtins.def b/gcc/builtins.def > index 4d97ca0eec9..fd040eb8d80 100644 > --- a/gcc/builtins.def > +++ b/gcc/builtins.def > @@ -1084,8 +1084,8 @@ DEF_BUILTIN_STUB (BUILT_IN_ADJUST_TRAMPOLINE, > "__builtin_adjust_trampoline") > DEF_BUILTIN_STUB (BUILT_IN_INIT_DESCRIPTOR, "__builtin_init_descriptor") > DEF_BUILTIN_STUB (BUILT_IN_ADJUST_DESCRIPTOR, "__builtin_adjust_descriptor") > DEF_BUILTIN_STUB (BUILT_IN_NONLOCAL_GOTO, "__builtin_nonlocal_goto") > -DEF_BUILTIN_STUB (BUILT_IN_NESTED_PTR_CREATED, > "__builtin_nested_func_ptr_created") > -DEF_BUILTIN_STUB (BUILT_IN_NESTED_PTR_DELETED, > "__builtin_nested_func_ptr_deleted") > +DEF_EXT_LIB_BUILTIN (BUILT_IN_NESTED_PTR_CREATED, > "__gcc_nested_func_ptr_created", BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LIST) > +DEF_EXT_LIB_BUILTIN (BUILT_IN_NESTED_PTR_DELETED, > "__gcc_nested_func_ptr_deleted", BT_FN_VOID, ATTR_NOTHROW_LIST) See above. Otherwise LGTM. Jakub