This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/86821] New: std::system_category() should map EDEADLOCK to EDEADLK
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Aug 2018 15:03:45 +0000
- Subject: [Bug libstdc++/86821] New: std::system_category() should map EDEADLOCK to EDEADLK
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86821
Bug ID: 86821
Summary: std::system_category() should map EDEADLOCK to EDEADLK
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
As of r263210 this passes on x86_64-pc-linux-gnu but fails on
powerpc64le-unknown-linux-gnu and fails on newlib targets:
#include <system_error>
#include <cassert>
#include <cerrno>
int main()
{
std::error_condition errcond(std::errc::resource_deadlock_would_occur);
#ifdef EDEADLOCK
assert( std::system_category().equivalent(EDEADLOCK, errcond) );
#endif
}
It would be nice if it passed consistently, i.e. if EDEADLOCK corresponded to
EDEADLK for the "system" error category.