https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113082
--- Comment #2 from Florian Weimer <fw at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > Joseph - I wonder if the standard folks can be convinced to amend most > library function documentation as to not altering 'errno' (like memcpy, > strlen, etc.)? > > Should we simply document our constraints on supported library > implementations? We can add attributes to the glibc headers, similar to the throw and leaf annotation we have today. It would act as a reminder that if we clobber errno in these functions due to some implementation detail, we need to save/restore errno.