This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 21 Nov 2012 09:21:06 -0800
- Subject: Re: PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class
- References: <CAMe9rOpaKE6XxgAev0wzivpSJoL_7-P9VycXnxyankniRZ-FPA@mail.gmail.com><20120918211231.6186A2C0A8@topped-with-meat.com><CAMe9rOp10=Y5u9BhJ6fqTmjYu_roxcXjHcdyUZ=W4XK2wfn71Q@mail.gmail.com><CAMe9rOq064vXtahyYp=UGeRkpwaSQXt14incxerQGJ0C98vcEg@mail.gmail.com><20120918220157.572E12C0AA@topped-with-meat.com><CAMe9rOrRHC4Tbe1hoCjrkYHhbL+AkTr=urK1RzEDv7FU9roLug@mail.gmail.com><Pine.LNX.4.64.1211211710200.16302@digraph.polyomino.org.uk>
On Wed, Nov 21, 2012 at 9:14 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Wed, 19 Sep 2012, H.J. Lu wrote:
>
>> diff --git a/nptl/ChangeLog b/nptl/ChangeLog
>> index 5d784a5..ebb9048 100644
>> --- a/nptl/ChangeLog
>> +++ b/nptl/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
>> +
>> + * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
>> + 64-bit store.
>> + (THREAD_SETMEM_NC): Likewise.
>> +
>
> I'm seeing large numbers of "cast from pointer to integer of different
> size" warnings on x86 builds, around uses of these macros. I suspect this
> patch is responsible - if code, even in part of an "if" statement that
> won't be executed, contains a pointer-to-integer cast, you need to cast to
> a pointer of the same size as the integer, and possibly then from there to
> a type of the desired final width.
>
This is a known bug in GCC and there is no workaround.
--
H.J.