This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] avoid strange arithmetic with strings in i386-dis.c


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.

OK.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]