Hal Finkel <hfin...@anl.gov> wrote, on 07 Nov 2017: > > [...] However, because setting > errno is not required by C for functions in complex.h, when POSIX says "No > errors are defined." that constrains the choice (POSIX is constraining the > implementation choice allowed by C as it does in many other cases). As a > result, under POSIX, the functions in complex.h don't set errno. > > Is my reading correct?
No, it's not correct. See the general rules in XSH 2.3 Error Numbers, in particular: "Implementations shall not generate a different error number from one required by this volume of POSIX.1-2008 for an error condition described in this volume of POSIX.1-2008, but may generate additional errors unless explicitly disallowed for a particular function." When a function's ERRORS section says "No errors are defined" this just means that the standard does not specify any mandatory or optional errors for the function, it doesn't mean that setting errno is disallowed. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England