public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-114629-35322-mDnCCDqIEf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114629-35322@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114629

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-04-07
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |diagnostic

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 one,
         and use the lower-level emit_diagnostic () instead of the more common
         internal_error_no_backtrace () in order to pass our locus.  */
      diagnostic_finalizer (global_dc) = 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 == "rust" || ident == "gcc")
            funny_error = true;

...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2024-04-07 19:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 15:38 [Bug rust/114629] New: " roland.illig at gmx dot de
2024-04-07 19:11 ` pinskia at gcc dot gnu.org [this message]
2024-04-07 23:44 ` [Bug rust/114629] " sjames at gcc dot gnu.org
2024-04-08  7:58 ` pierre-emmanuel.patry at embecosm dot com
2024-04-08  8:47 ` rguenth at gcc dot gnu.org
2024-04-08  9:45 ` iains at gcc dot gnu.org
2024-04-09  0:11 ` pinskia at gcc dot gnu.org
2024-04-09  7:18   ` Jakub Dupak
2024-04-09  0:52 ` pinskia at gcc dot gnu.org
2024-04-09  7:07 ` dkm at gcc dot gnu.org
2024-04-09 10:57 ` iains at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114629-35322-mDnCCDqIEf@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).