PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class

Joseph S. Myers joseph@codesourcery.com
Wed Nov 21 17:27:00 GMT 2012


On Wed, 21 Nov 2012, H.J. Lu wrote:

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

It's not at all clear it's a bug, and it should certainly be possible to 
work around it using the same sort of trick as in 
tgmath.h:__tgmath_real_type_sub to create a typedef that is uint64_t when 
the argument is 64-bit and uint32_t otherwise.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list