This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][Binutils] Always skip only 1 byte for CIE version 1's return address register.
- From: Alan Modra <amodra at gmail dot com>
- To: Tamar Christina <Tamar dot Christina at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 1 Mar 2019 11:01:21 +1030
- Subject: Re: [PATCH][Binutils] Always skip only 1 byte for CIE version 1's return address register.
- References: <VI1PR0802MB2317BE20FDBB1702FCB69C09FF750@VI1PR0802MB2317.eurprd08.prod.outlook.com>
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