This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]