On Sat, 2025-09-13 at 01:42 -0300, Alexandre Oliva wrote: > > Add __get_errno_ptr() as yet another synonym for __errno_location. > > This came up while updating a port for a target that uses this > function > name in the implementation of errno. Tested on that target, and on > x86_64-linux-gnu and aarch64-linux-gnu natives. Ok to install? >
LGTM; thanks! Dave > for gcc/analyzer/ChangeLog > > * kf.cc (register_known_functions): Add __get_errno_ptr. > --- > gcc/analyzer/kf.cc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc > index 2a7c357031533..5c54b55644869 100644 > --- a/gcc/analyzer/kf.cc > +++ b/gcc/analyzer/kf.cc > @@ -2373,6 +2373,7 @@ register_known_functions > (known_function_manager &kfm, > kfm.add ("___errno", std::make_unique<kf_errno_location> ()); > kfm.add ("__error", std::make_unique<kf_errno_location> ()); > kfm.add ("__errno", std::make_unique<kf_errno_location> ()); > + kfm.add ("__get_errno_ptr", std::make_unique<kf_errno_location> > ()); > } > > /* Language-specific support functions. */ >