https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93151
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The config/os/generic/error_constants.h file already uses these macros
conditionally:
#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
state_not_recoverable = ENOTRECOVERABLE,
#endif
The problem is that we use those config macros, which are fixed when libstdc++
is built and don't match the set of available macros when preprocessing the
header.
We should either do:
#if defined _GLIBCXX_HAVE_ENOTRECOVERABLE && defined ENOTRECOVERABLE
state_not_recoverable = ENOTRECOVERABLE,
#endif
or simply:
#ifdef ENOTRECOVERABLE
state_not_recoverable = ENOTRECOVERABLE,
#endif
I don't know what the advantage of testing for them at configure time is.