[PATCH] gas: accept custom ".linefile <n> ."

Jan Beulich jbeulich@suse.com
Tue Nov 15 07:59:01 GMT 2022


On 14.11.2022 14:43, Nick Clifton wrote:
>> --- a/gas/input-scrub.c
>> +++ b/gas/input-scrub.c
>> @@ -469,13 +469,15 @@ new_logical_line_flags (const char *fnam
>>         /* FIXME: we could check that include nesting is correct.  */
>>         break;
>>       case 1 << 3:
>> -      if (line_number < 0 || fname != NULL || next_saved_file == NULL)
>> +      if (line_number < 0 || fname != NULL)
>>   	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? I've been using abort() (here
and elsewhere) only because of pre-existing adjacent uses and H.J. at
some point (in x86 code) asking me to use that in favor of gas_assert().
Personally I'd prefer making things like the above assertions. But
perhaps such could also be as_fatal().

Jan


More information about the Binutils mailing list