• 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: Pointer signedness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pointer signedness


  • Subject: Re: Pointer signedness
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 22 Jan 2014 08:45:00 -0600

On Jan 22, 2014, at 7:00 AM, Jan E. Schotsman wrote:

> I am getting an error "pointer targets differ in signedness" in some code. The pointer is a stack array myArray.
> If a change the array declaration from   SInt8 myArray[64]   to   char myArray[64]   the error goes away.
> This must be a bug in  Xcode 3.1.3, right?

I don't think so.  Whether char is signed or unsigned depends on the compiler and its options.  Code which makes the (possibly implicit) assumption that it's one or the other is not portable.  It can break when compiled differently.  Therefore the warning.

Regards,
Ken


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • RE: Pointer signedness
      • From: "Dallman, John" <email@hidden>
    • Re: Pointer signedness
      • From: "Jan E. Schotsman" <email@hidden>
References: 
 >Pointer signedness (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Pointer signedness
  • Next by Date: Re: Pointer signedness
  • Previous by thread: Pointer signedness
  • Next by thread: Re: Pointer signedness
  • Index(es):
    • Date
    • Thread