From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8B833854576; Mon, 21 Nov 2022 13:40:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8B833854576 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669038059; bh=4RZIjjqDBteR8OuXJ54q2axb0tTBwkoZgKlshywIVRQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v2SydmgQvxftw3mUQkKEFxEWeC2XHMYqVlE+Ewds5mDnZTzgGXZXDqtBEJWpsxTwR fsujmbthnkbPKmauzZV6aMASuzGS4cAWJ+yrlWqhvfC40SGtLvCwghFIuRoRJvBcMP LEcETnUBxBUtDZV2+vdMjfAyXodzt1471EIjL60o= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107792] Output of default contract violation handler could be improved Date: Mon, 21 Nov 2022 13:40:54 +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: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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=3D107792 --- Comment #1 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #0) > default std::handle_contract_violation called:=20 N.B. The function is not in namespace std. This seems better: default handle_contract_violation called [default:default:NEVER] in function f at fail.cc:1: r > 0 terminate called without an active exception Aborted (core dumped) We could say "[level:default role:default continue:NEVER]" instead if the shorter form is too obscure. Maybe instead of saying the default handler was called, we should just say a contract was violated. That's what users actually care about, not the handl= er itself: contract violation in function f at fail.cc:1: r > 0 [level:default, role:default, continuation mode:never] terminate called without an active exception Aborted (core dumped)=