On Jul 11, 2024, Jonathan Wakely <jwak...@redhat.com> wrote: > And std::system_error doesn't limit the values that can be passed to > it either. So I'd prefer to keep testing with arbitrary int values, > because that *should* work.
Fair enough, thanks. I've seen portability documentation suggesting that strerror returns NULL on some systems, if the error code is unknown, and it didn't seem to me that libstdc++ was prepared to deal with that. I'm not sure this system, on which I saw the failure, returns NULL or fails in some other way, but it's clear its behavior is not compliant with the relevant standards. It makes sense to test for this condition, though IMHO that makes it more of a libc test than a libstdc++ test, compared with the patched version I proposed. Not that I object to that :-) I just hadn't understood the goal. Patch withdrawn. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity Excluding neuro-others for not behaving ""normal"" is *not* inclusive