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][Binutils] Always skip only 1 byte for CIE version 1's return address register.


On Thu, Feb 28, 2019 at 07:14:50PM +0000, Tamar Christina wrote:
> -	      buf += 9;
> +	      buf += 8;
> +	      version = (unsigned int)(*(char*) buf++);

OK, but without any of the casts in the above line.  Plain
	      version = *buf++;
is better.  (Casts to char possibly lead to host dependent behaviour
since char is signed on some hosts, unsigned on others.  Fairly
obviously this cast won't cause trouble, but the casts are entirely
unnecessary.)

-- 
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]