public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/104883] <system_error> should define all std::errc enumerators
Date: Thu, 22 Sep 2022 21:59:22 +0000	[thread overview]
Message-ID: <bug-104883-4-ql18eiePJx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104883-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104883

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-09-22
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 53613
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53613&action=edit
Generate error_constants.h from <errno.h>

    Instead of having several very similar target-specific headers with
    slightly different sets of enumerators, generate the error_constants.h
    file as part of the build. This ensures that all enumerators are always
    defined, with the value from the corresponding errno macro if present,
    or a libstdc++-specific alternative value.

    The libstdc++-specific values will be values greater than the positive
    integer _GLIBCXX_ERRC_ORIGIN, which defaults to 9999 but can be set in
    os_defines.h if a more suitable value exists for the OS (e.g. ELAST
    could be used for BSD targets).


The advantage of doing this is that we get a header that can be used
freestanding, but with values that match the hosted errno.h (if one exists on
the target).

  parent reply	other threads:[~2022-09-22 21:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 15:20 [Bug libstdc++/104883] New: " redi at gcc dot gnu.org
2022-09-22 10:47 ` [Bug libstdc++/104883] " redi at gcc dot gnu.org
2022-09-22 21:59 ` redi at gcc dot gnu.org [this message]
2023-02-01 21:07 ` cvs-commit at gcc dot gnu.org
2023-02-01 21:23 ` redi at gcc dot gnu.org
2023-02-02  9:34 ` cvs-commit at gcc dot gnu.org
2023-03-16 16:51 ` cvs-commit 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-104883-4-ql18eiePJx@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).