Skip to content

GB-084 19.5.2 [system.error.syn] Deprecate std::errc constants related to UNIX STREAMS #444

@wg21bot

Description

@wg21bot

The error numbers ENODATA, ENOSR, ENOSTR and ETIME are all marked "obsolecent" in POSIX 2017 (the current normative reference for C++) and they are absent in the current POSIX 202x draft. They related to the obsolete STREAMS API, which was optional and not required for conformance to the previous POSIX standard (because popular unix-like systems refused to implement it). C++11 added those error numbers to <errno.h> and also defined corresponding errc enumerators: errc::no_message_available, errc::no_stream_resources, errc::not_a_stream and errc::stream_timeout.

Given the obsolescent status of those constants in the current normative reference and their absence from the next POSIX standard, WG21 should consider deprecating them now. A deprecation period will allow removing them when C++ is eventually rebased to a new POSIX standard. Otherwise C++ will be left with dangling references to ENODATA, ENOSR, ENOSTR and ETIME that are not defined in the POSIX reference.

After a period of deprecation they can be removed from Annex D, and the names added to [zombie.names] so that implementations can continue to define them if they need to.

Move the four <errno.h> error numbers and the corresponding four errc enumerators to Annex D.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions