On Tue, Nov 12, 2019 at 11:13 AM Andreas Schwab <sch...@suse.de> wrote: > > On Nov 12 2019, Richard Biener wrote: > > > This means a tentative definition for 'errno' is non-conforming? > > https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html > > If a macro definition is suppressed in order to access an actual > object, or a program defines an identifier with the name errno, the > behavior is undefined.
To quote the relevant parts before this: The <errno.h> header shall provide a declaration or definition for errno. The symbol errno shall expand to a modifiable lvalue of type int. It is unspecified whether errno is a macro or an identifier declared with external linkage. The first sentence suggests errno.h can provide a tentative definition (since that's also a definition?). The third sentence gives choice only between a macro and a declaration with external linkage (that's clearly _not_ a definition). So ... Richard. > Andreas. > > -- > Andreas Schwab, SUSE Labs, sch...@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different."