Re: Pointer signedness
Re: Pointer signedness
- Subject: Re: Pointer signedness
- From: "Jan E. Schotsman" <email@hidden>
- Date: Wed, 22 Jan 2014 16:32:01 +0100
On Jan 22, 2014, at 3:45 PM, Ken Thomases 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.
Even if I haven't checked "char Type is unsigned" in the Build options?
The Target Info assistent says nothing about this.
Jan E.
_______________________________________________
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