[Bug libstdc++/104883] <system_error> should define all std::errc enumerators
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 22 21:59:22 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104883
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-09-22
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 53613
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53613&action=edit
Generate error_constants.h from <errno.h>
Instead of having several very similar target-specific headers with
slightly different sets of enumerators, generate the error_constants.h
file as part of the build. This ensures that all enumerators are always
defined, with the value from the corresponding errno macro if present,
or a libstdc++-specific alternative value.
The libstdc++-specific values will be values greater than the positive
integer _GLIBCXX_ERRC_ORIGIN, which defaults to 9999 but can be set in
os_defines.h if a more suitable value exists for the OS (e.g. ELAST
could be used for BSD targets).
The advantage of doing this is that we get a header that can be used
freestanding, but with values that match the hosted errno.h (if one exists on
the target).
More information about the Gcc-bugs
mailing list