[PATCH] s390: Fix build warning with gcc6 in jmpbuf-unwind.h.
Carlos O'Donell
carlos@redhat.com
Thu Jul 23 18:20:00 GMT 2015
On 07/23/2015 05:11 AM, Andreas Schwab wrote:
> Stefan Liebler <stli@linux.vnet.ibm.com> writes:
>
>> On 07/23/2015 10:30 AM, Andreas Schwab wrote:
>>> Stefan Liebler <stli@linux.vnet.ibm.com> writes:
>>>
>>>> This patch casts _Unwind_GetCFA return to _Unwind_Ptr first
>>>
>>> How can a cast fix a truncated pointer value on s390x?
>>>
>>> Andreas.
>>>
>> Why is the pointer truncated on s390x?
>> All three types _Unwind_Word, _Unwind_Ptr and void * have a size of 4bytes
>> on s390 and 8 bytes on s390x.
>
> Then why do you get a warning?
Agreed.
Why do you get a warning if the types are, as you claim, the same size?
I don't disagree that they are the same size, since the code is generic
and `typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));`
should result in the values you quote.
If it's a compiler defect then rather than a cast you need to file a bug
and disable the warning with the glibc diagnostic macros and include
rationale for that points at the gcc bug.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list