[PATCH] x86: drop print_operand_value()'s "hex" parameter

Jan Beulich jbeulich@suse.com
Wed Jun 22 06:23:11 GMT 2022


On 15.06.2022 17:07, Michael Matz wrote:
> On Tue, 14 Jun 2022, Jan Beulich via Binutils wrote:
> 
>> For quite some  time all callers have been passing 1 / true. While there
>> fold the final oappend_with_style() calls.
>> ---
>> Instead of 0x%x I could see us using %#x, thus printing at least zero
>> without the redundant 0x prefix. Thoughts?
> 
> As you're asking for opinions, here's mine: in this case I think 
> consistency is better, I think there's no obvious reason to print
>   0 but 0xa (for instance)
> and not
>   0x0 and 0xa
> Sure, it's redundant, but IMHO that doesn't trump consistency.

I see. Yet my point isn't merely consistency, but also readability. To
me at least 0 is more easily recognizable as "zero" than 0x0. Indeed I
would go as far as saying the same for 1...9 as well, just that there
we'd need custom code whereas for 0 we have an easy way to omit the
leading 0x.

Jan


More information about the Binutils mailing list