This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: fix cast-to-int problem in unwind-dw2.c


On Thu, May 08, 2003 at 09:39:56AM -0700, Richard Henderson wrote:
> On Thu, May 08, 2003 at 11:18:41AM -0400, Daniel Jacobowitz wrote:
> > If (_Unwind_Word) (_Unwind_Word) context->cfa was wrong, why isn't
> > (_Unwind_Word) (_Unwind_Ptr) context->cfa?
> 
> MIPS n32.  sizeof _Unwind_Word==8, _Unwind_Ptr==4, void*==4,
> which yields a cast from pointer to integer changes size warning.

Oh... what I was missing is that:
  sizeof _Unwind_Word >= sizeof _Unwind_Ptr
and
  _Unwind_Word and _Unwind_Ptr are both integer types

So of course we don't get the warning any more.

> > In IA64/hpux ilp32 mode, that's 64 bits and void* is 32 bits.
> 
> Yeah, blame that on HP engineers.  In order to interoperate with
> their system library, we have to set the size that way.  They 
> get to live with the warning.
> 
> There are a *lot* of things I'd have done differently for ilp32
> mode on ia64.  But they didn't ask me.  ;-)

:)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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