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: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail 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 17:14:55 +0000
- 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>
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.
Please watch out for any warnings added by any patch you submit. I'd like
us to end up using -Werror, but until then we need to keep watching for
new warnings manually, and keep cleaning up existing warnings.
--
Joseph S. Myers
joseph@codesourcery.com