WG 14 Document number | N1338 |
Date | 2008-04-25 |
Project | Programming Language C |
Reference | ISO/IEC IS 9899:1999 |
Reply to | Nick Stoughton |
USENIX Association | |
nick@usenix.org |
SC22 WG14 N1257 describes an inconsistency in the wording for <errno.h>. N1308 followed up proposing changes in wording to both C and C++ to bring them into alignment with POSIX, allowing errno to be implemented as either a macro or an identifier with external linkage.
Following discussions with both the C and C++ committees, it is clear that
the cost of requiring it to be defined as a macro is infinitesimally small,
since in the worst case it simply requires
#define errno errno
In the vast majority of known implementations, errno is already a macro.
To that end, this proposal seeks to clarify the wording in the C standard to force errno to be defined as a macro.
In 7.5 paragraph 2, delete the penultimate sentence:
It is unspecified whether errno is a macro or an identifier declared with external linkage.