From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB35C3945C1F; Mon, 21 Nov 2022 10:17:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB35C3945C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669025871; bh=1wBY3D3RX9hwrKnTniwjFONQPY4bpVYXa9l0IQzVkR4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EEFjA8z1fIxcyugMxecyhsB3RIkkdCewVvWOTtrYDcww0LNewwEAj2Ruhblz5pWGl RBLMiJ4JcfRmnn3rpzeXZ+ESEF7Q4ma7vxuTVk/mmA8Y1E/t3+yuJJidhf/Oa6ONr8 cMgQvBkEpDLLl0qCmuwPtyOxgBfnxi+lBb4aucck= From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107778] handle_contract_violation should reflect _GLIBCXX_VERBOSE Date: Mon, 21 Nov 2022 10:17:51 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107778 --- Comment #8 from cqwrteur --- (In reply to cqwrteur from comment #6) > (In reply to Jonathan Wakely from comment #4) > > (In reply to cqwrteur from comment #3) > > > Also why the function is not noexcept? > >=20 > > Writing to streams can throw. > >=20 > > If you don't like the default handler you can provide your own. >=20 > The problem is that the function is still not marked as noexcept and it w= ill > cause serious issues with noexcept functions (like using contracts in > operator[] for example) btw I do not know whether there is a toggle to just add a contract check wi= th __builtin_trap() or std::terminate for example. The current implementation = of the contract ts in GCC is ridiculously expensive tbh due to too many parame= ters that need to be passed into the handler function.=