[PATCH v3 0/3] gas: add command line option to inhibit info messages

Matthieu Longo matthieu.longo@arm.com
Fri Jul 26 10:59:37 GMT 2024


On 2024-07-10 13:27, Jan Beulich wrote:
> On 10.07.2024 13:26, Matthieu Longo wrote:
>> Hi,
>>
>> GAS currently emits information messages for context information along warnings. These extra messages might sometimes pollute the test expectations when checking for error message patterns in stderr output.
>>
>> This patch aims at providing two new flags while preserving the existing behavior if none of the options is provided.
>>    * --info, similar to the existing --warn flag to enable diagnostic information messages (default behavior).
>>    * --no-info, similar to the existing --no-warn flag to disable diagnostic information messages.
>>
>> It also adds the flags to the existing documentation, and command manual.
>>
>> As an example of its benefit, I used the new flag for the system register tests under gas/testsuite/gas/aarch64/sysreg testsuite, and the info message for macro expansion were removed inside the tests expectations.
>>
>> Regression tested on aarch64-none-elf, and no regression found.
>>
>> Ok for binutils-master?
>>
>> Regards,
>> Matthieu.
>>
>> Changes from v0:
>> - reorder warning options
>>    https://sourceware.org/pipermail/binutils/2024-June/135232.html
>> - rename flag_no_infos to flag_no_information.
>> - documentation: move --no-info and --info flags after warnings flags.
>> - remove from this patch's scope the tests relying on the line number.
>>    add a check in output_info() in AArch64 backend.
>>    check flag_no_information flag and quickly return if enabled, as requested in the previous revision's review.
>>    https://sourceware.org/pipermail/binutils/2024-June/135231.html
>>
>> Changes from v1:
>> - move the '--info' section up to respect alphabetical order.
> 
> It's at least close to nitpicking, I know, but still: In response to
> this change of yours I said that you didn't go far enough with what you
> did. I did not ...
> 
>> Changes from v2:
>> - reorder '--no-info' sections to respect alphabetical order.
> 
> ... ask for ordering to be done based on the "no-" prefix. The place
> I'd look for when wanting to know something info message related would
> be at 'i', not 'n'. I'm sorry if this didn't come through clear enough.
> 
> The fact that --no-pad-sections lives where it does is, I guess, just
> because there's no --pad-sections (for whatever reason).
> 
> And again, commenting would have been easier if you sent patches inline,
> as then there is context to actually associate a comment with, and it is
> also possible to talk in "further up" and "further down" terms.
> 
> Jan

Hi Jan,

I merged the first patch of the series as you already approved it.
I would like to send again the 2 remaining patches *INLINED* in the 
email (as you requested) and UNCHANGED (=v3) so that it will be easier 
for you to comment.
I apologize for not doing this the first time, I am not familiar with 
practices of patch reviews via emails.

Regarding the ordering of options, I decided to move --no-info and 
--info flags to the letter 'N' to follow the same approach as with 
--no-warn. In my understanding, '--no-warn' (a.k.a -W) is referenced at 
the letter 'W' because of its shortened option '-W', and not because of 
'--warn'.
The current listing of the options in gas doc is a bit confusing, and 
above all, having the '-W' short option for `--no-warn` instead of 
`--warn` is utterly confusing from a user's perspective.

Additionally, I want to highlight that --warn and --info are enabled by 
default, so the --no-* variant might be the first one we want to list.

Please, let me know what you think about the above.

Matthieu.


More information about the Binutils mailing list