From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7D0B73858D38; Thu, 22 Sep 2022 21:59:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D0B73858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663883962; bh=3rVZcuTawYNn2fsXQw1YPZkZ+FyWDL4rsuh5hhQc68A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V/xjtL62vBK3O4M9M/4zx9QnABoUMqL/BIGcIJm/niDsiyTJATeDVDfDNdoub/ZaY Es7jWnk71g0QuguIcovPA4s7UbSazxRNsECw9T0HBpf3hUkrHUXeRH9nPh8UdkATSw pXoapgQoHwQdzkdSF289RCI87lzZOjDIWnBCBGpw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104883] should define all std::errc enumerators Date: Thu, 22 Sep 2022 21:59:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed bug_status assigned_to attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104883 Jonathan Wakely 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 --- Created attachment 53613 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53613&action=3Dedit Generate error_constants.h from 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).=