public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] gas: accept custom ".linefile <n> ."
Date: Tue, 15 Nov 2022 11:23:47 +0000	[thread overview]
Message-ID: <0efc9f53-1298-a5c5-333e-c488beb26360@redhat.com> (raw)
In-Reply-To: <77dc27ff-3293-4073-29e2-b9ee1a00016a@suse.com>

Hi Jan,

>>>    	abort ();
>>
>> I still hate having calls to abort() in code.  Much better to have
>> a helpful error message IMHO.  Not important for this patch though.
> 
> So do you consider gas_assert() better? 

Not really.  It still does not tell the user what has gone wrong, nor
does it help them avoid the problem.  Sure they can report it, and having
an abort makes it easier for an investigator to use a debugger to catch
the problem, but in the meantime the user is still left wondering what
went wrong.

The assembler (and other tools) already have a well understood way of
telling the user that something has gone wrong - the exit status code,
along with, hopefully, an error message.  So I think that it is best
to make use of it.

 > But perhaps such could also be as_fatal().

Given a choice, I would definitely prefer as_fatal() over gas_assert()
or abort().  But this is just my preference.  I am not laying down the
law here, and I am not going to reject patches just because they contain
calls to abort.

Cheers
   Nick


      reply	other threads:[~2022-11-15 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  7:32 Jan Beulich
2022-11-14 13:43 ` Nick Clifton
2022-11-14 15:53   ` Jan Beulich
2022-11-14 16:02     ` Nick Clifton
2022-11-14 16:16       ` Jan Beulich
2022-11-15 11:16         ` Nick Clifton
2022-11-15  7:59   ` Jan Beulich
2022-11-15 11:23     ` Nick Clifton [this message]

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=0efc9f53-1298-a5c5-333e-c488beb26360@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    /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).