[Top][All Lists]

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

Re: Creating a GNUstep desktop on Solaris

From: Adam Fedor
Subject: Re: Creating a GNUstep desktop on Solaris
Date: Thu, 6 Jan 2005 08:49:29 -0700

On Jan 5, 2005, at 11:45 AM, Christian Plessl wrote:

I'm rather new to Objective-C and Cocoa/GNUStep programming, but is this the standard behavior?

I thought, that messages sent to nil objects should be silently ignored by the Objective-C runtime system. Am I missing something?

Yes it is standard behavior, and ObjC does ignore a message to a nil object and just returns 'NULL'. The problem is Solaris chokes when you try to assign a 'NULL' to a structure. Even this should crash Solaris (if you could actually compile it, which you can't since the compiler is smart enough for this):

struct foo {int i; int j;};

struct foo bar;

bar = (struct foo)0;

reply via email to

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