• 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
Compiler bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiler bug?


  • Subject: Compiler bug?
  • From: Ken Tozier <email@hidden>
  • Date: Fri, 12 May 2006 11:55:14 -0400

Hi

Given an NSMutable array "fieldArray"
and an array of C string pointers "row"

I'm seeing a the compiler warning

"warning: comparison of distinct Objective-C types lacks a cast"

 When I write a statement like this

[fieldArray addObject: (row[i] == NULL) ? [NSNull null] : [NSNumber numberWithLongLong: [value intValue]]];

But it compiles without warning when I rewrite the statement like this:

if (row[i] == NULL)
	[fieldArray addObject: [NSNull null]];
else
	[fieldArray addObject: [NSNumber numberWithInt: [value intValue]]];

Does that seem like a bug to anyone else?

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: Compiler bug?
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: Java 5 and WO problem
  • Next by Date: Re: Compiler bug?
  • Previous by thread: How to Index Russian help?
  • Next by thread: Re: Compiler bug?
  • Index(es):
    • Date
    • Thread