From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 330353858415; Sun, 7 Apr 2024 19:11:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 330353858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712517094; bh=+gLmRmw9tR7NOq4rI5VS615LXd4HsOYwPW7DC2D8Ft4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CFPDvD6n4jhGIRb+WryeAaN65I/lQ2grzX7MO1LgCTXkmkm134HUTmzm73taBmgo3 2Husr6DTUs+H3WZy2jHSP0PZKLPMkQqPcM4QhyTWy2PBzGz9yi45sCVRk6b1uPoMMg rOafs8lvR/ayz/NjxDUIodpX2PzHxSU4LG+y1jCY= From: "pinskia at gcc dot gnu.org" To: gcc-rust@gcc.gnu.org Subject: [Bug rust/114629] rust-ast-resolve-expr contains bloated code for funny_error Date: Sun, 07 Apr 2024 19:11:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rust X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed cf_reconfirmed_on bug_status keywords 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=3D114629 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-04-07 Status|UNCONFIRMED |NEW Keywords| |diagnostic --- Comment #1 from Andrew Pinski --- Confirmed. else if (funny_error) { /* This was a "break rust" or "break gcc", and the identifier failed = to resolve. Emit a funny ICE. We set the finalizer to our custom on= e, and use the lower-level emit_diagnostic () instead of the more com= mon internal_error_no_backtrace () in order to pass our locus. */ diagnostic_finalizer (global_dc) =3D funny_ice_finalizer; emit_diagnostic (DK_ICE_NOBT, expr.get_locus (), -1, "are you trying to break %s? how dare you?", expr.as_string ().c_str ()); This is not even that funny. I suggest to remove the idea of funny_error really. if (ident =3D=3D "rust" || ident =3D=3D "gcc") funny_error =3D true; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=