• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: __CAST_DOWN_CHECK compiler errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __CAST_DOWN_CHECK compiler errors


  • Subject: Re: __CAST_DOWN_CHECK compiler errors
  • From: "Dave B. Sharp" <email@hidden>
  • Date: Sat, 17 Nov 2007 09:38:16 -0500 (EST)

Thanx sorry,
  The error was:
"error: size of array'__CAST_DOWN_CHECK is negative"

 The code comes from vm_param.h and the sample driver
was created from the xcode generated generic driver.
After setting the compiler to gcc 4.0 for the ppc I
got this error.
  Dave

--- Shantonu Sen <email@hidden> wrote:

> You haven't provided the compiler error, nor the
> compiler invocation
> causing the error, nor much else.
>
> Shantonu Sen
>
> On Nov 16, 2007, at 6:08 PM, Dave B. Sharp wrote:
>
> > Hi there,
> >  I'm trying to build a hello world driver on a G5
> > using gcc 4.0. Wondering what the  solution(s) has
> > been to the following error.
> >  Cheers
> >    Dave
> >
> >
> >
> > /* We need a way to get rid of compiler warnings
> when
> > we cast from   */
> > /* a 64 bit value to an address that is 32 bits.
> >              */
> > /* We know at this point the cast is harmless but
> > sometime in        */
> > /* the future it may not be.
> >              */
> > /* When size of an int is no longer equal to size
> of
> > uintptr_t then  */
> > /* the compile will fail and we know we need to
> fix
> > our cast.		 */
> > #include <stdint.h>
> > #ifndef __CAST_DOWN_CHECK
> > #define __CAST_DOWN_CHECK
> > typedef char __NEED_TO_CHANGE_CAST_DOWN[
> > sizeof(uintptr_t) == sizeof(int) ? 0 : -1 ];
> > #define CAST_DOWN( type, addr )  (
> ((type)((uintptr_t)
> > (addr))) )
> > #endif /* __CAST_DOWN_CHECK */
> >
> >
> >
> >
> ____________________________________________________
> > Yahoo! Canada Toolbar: Search from anywhere on the
> web, and bookmark
> > your favourite sites. Download it now at
> > http://ca.toolbar.yahoo.com.
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Darwin-kernel mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
> >
> > This email sent to email@hidden
>
>



      Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: __CAST_DOWN_CHECK compiler errors
      • From: Shawn Erickson <email@hidden>
References: 
 >Re: __CAST_DOWN_CHECK compiler errors (From: Shantonu Sen <email@hidden>)

  • Prev by Date: How to know Darwin Version from a Kext
  • Next by Date: Re: replacement routine
  • Previous by thread: Re: __CAST_DOWN_CHECK compiler errors
  • Next by thread: Re: __CAST_DOWN_CHECK compiler errors
  • Index(es):
    • Date
    • Thread