Consensus on MT-, AS- and AC-Safety docs.
Alexandre Oliva
aoliva@redhat.com
Thu Nov 21 23:49:00 GMT 2013
On Nov 20, 2013, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> The point of an "errno" annotation for AS-safety is that only the user
> writing their signal handler can decide whether saving and restoring errno
> is the right thing to do in their program, depending on whether the signal
> handler calls relevant functions with arguments that might involve a
> change to errno and what code might be interrupted by the signal.
But then... for functions that may modify errno, isn't that *already*
part of their documentation? Arguably, it should be, and then the only
missing bits would be adding the caveat as a keyword (easyish), and
verifying that functions don't inadvertently set errno without saying so
(harder, global analysis).
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
More information about the Libc-alpha
mailing list