http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60555

            Bug ID: 60555
           Summary: std::system_category().default_error_condition()
                    doesn't map system errno values to
                    std::generic_category()
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: c.m.brandenburg at gmail dot com

Created attachment 32376
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32376&action=edit
Program that exposes the bug.

According to the C++ standard, if the value ev corresponds to the POSIX errno
value posv, then std::system_category().default_error_condition(ev) should
return std::error_condition(posv, generic_category()). The libstdc++
implementation doesn't do this. Instead, it always returns
std::error_condition(ev, std::system_category()).

Attached is a program that exposes this bug. I've seen this problem on 4.7.2,
but an inspection of the source code for 4.8.2 suggests the bug exists for that
version too.

Reply via email to