From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B94D395C809; Mon, 19 Apr 2021 09:31:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B94D395C809 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99077] [9 Regression] Cannot build libstdc++ with -fno-rtti Date: Mon, 19 Apr 2021 09:31:00 +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: 11.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 09:31:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99077 --- Comment #7 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:3674bfbe7c19fb1e7dfcd0a09dbad9d0e3868d78 commit r9-9358-g3674bfbe7c19fb1e7dfcd0a09dbad9d0e3868d78 Author: Jonathan Wakely Date: Fri Feb 12 10:37:56 2021 +0000 libstdc++: Fix bootstrap with -fno-rtti [PR 99077] When libstdc++ is built without RTTI the __ios_failure type is just an alias for std::ios_failure, so trying to construct it from an int won't compile. This changes the RTTI-enabled __ios_failure type to have the same constructor parameters as std::ios_failure, so that the constructor takes the same arguments whether RTTI is enabled or not. The __throw_ios_failure function now constructs the error_code, instead of the __ios_failure constructor. As a drive-by fix that error_code is constructed with std::generic_category() not std::system_category(), because the int comes from errno which corresponds to the generic category. libstdc++-v3/ChangeLog: PR libstdc++/99077 * src/c++11/cxx11-ios_failure.cc (__ios_failure(const char*, in= t)): Change int parameter to error_code, to match std::ios_failure. (__throw_ios_failure(const char*, int)): Construct error_code from int parameter. (cherry picked from commit 4591f7e5329dcc6ee9af2f314a050936d470ab5b)=