discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnustep on alpha linux


From: David Ayers
Subject: Re: Gnustep on alpha linux
Date: Wed, 19 Feb 2003 17:39:43 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212

Andrew Maier wrote:

Indeed this line give the following warning:

Compiling file NSArray.m ...
NSArray.m: In function `compare':
NSArray.m:787: warning: cast from pointer to integer of different size

But this warning seems more troublesome:

NSArray.m: At top level:
NSArray.m:1894: warning: cast increases required alignment of target type

which is repeated 5 or 6 times for the same line. I am not sure what it
referers to sice NSArray.m only has 1893 lines :(

I will try to build with debug and see what I can come up with.
        Andrew

Try to replace it with this:

static NSComparisonResult compare(id elem1, id elem2, void* context)
{
 NSComparisonResult (*imp)(id, SEL, id);

 imp = (NSComparisonResult (*)(id, SEL, id))
   [elem1 methodForSelector: context];

 return (*imp)(elem1, context, elem2);
}

I'm not sure what the hit in overall performance is or wheter that is in issue. Richard?

Cheers,
Dave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]