This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] avoid strange arithmetic with strings in i386-dis.c
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: "Alan Modra" <amodra at gmail dot com>, "Roland McGrath" <mcgrathr at google dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 11 Oct 2013 07:30:33 +0100
- Subject: Re: [PATCH] avoid strange arithmetic with strings in i386-dis.c
- Authentication-results: sourceware.org; auth=none
- References: <CAB=4xhoJe2Z_Uex9_mXmG2ea1ZdDwoBXUYMi8J3yM+=Yu3SV1Q at mail dot gmail dot com> <20131011004651 dot GI6368 at bubble dot grove dot modra dot org>
>>> On 11.10.13 at 02:46, Alan Modra <firstname.lastname@example.org> wrote:
> On Thu, Oct 10, 2013 at 04:15:00PM -0700, Roland McGrath wrote:
>> This makes the code a bit less baroque, and also avoids warnings from some
>> compilers. After the various changes I've committed in the last couple of
>> days, this is enough to get binutils (excluding gold) to build warning-free
>> with a recent Clang.
> Baroque? I think you meant to say "Inexperienced programmers, minds
> corrupted by the bizarre and perverse nature of C++, ignorant of the
> fact that a C string is an array, find a time-honoured C trick from
> days when life was simple and compilers non-optimising, confusing.
> Clang, catering to these users and written by mad C++ programmers,
> warns about perfectly good code."
>> * i386-dis.c (oappend_maybe_intel): New function.
>> (OP_ST, OP_STi, append_seg, OP_I, OP_I64, OP_sI, OP_ESreg): Use it.
>> (OP_C, OP_T, CMP_Fixup, OP_EX_VexImmW): Likewise.
>> (VCMP_Fixup, VPCMP_Fixup, PCLMUL_Fixup): Likewise.
I'm surprised you even approved of the change considering the