public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "c.m.brandenburg at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/60555] New: std::system_category().default_error_condition() doesn't map system errno values to std::generic_category()
Date: Mon, 17 Mar 2014 19:07:00 -0000	[thread overview]
Message-ID: <bug-60555-4@http.gcc.gnu.org/bugzilla/> (raw)

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	other threads:[~2014-03-17 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 19:07 c.m.brandenburg at gmail dot com [this message]
2014-03-17 19:08 ` [Bug libstdc++/60555] " c.m.brandenburg at gmail dot com
2014-03-18 20:40 ` redi at gcc dot gnu.org
2014-09-19 14:01 ` redi at gcc dot gnu.org
2015-04-22 12:00 ` jakub at gcc dot gnu.org
2015-07-16  9:12 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60555-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).