discuss-gnustep
[Top][All Lists]
Advanced

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

Re: art backend : NSView crashes


From: David Chisnall
Subject: Re: art backend : NSView crashes
Date: Fri, 1 May 2015 10:00:25 +0100

On 30 Apr 2015, at 23:11, Fred Kiefer <fredkiefer@gmx.de> wrote:
> 
> Looks like gcc 4.9 has gotten very strict about method calls on nil that 
> return a structure. It has always been better to check that case, but now it 
> has become a must.

This has always been the case with gcc: it will call a function with the wrong 
signature.  On most architectures, this just means that the results are 
nonsense.  On SPARC, the ABI means that you are guaranteed an illegal 
instruction trap.  On other architectures it will sometimes break in odd ways.

Clang inserts an explicit nil check around message sends that return a struct 
and will return a zero’d struct, so this is safe to do for code that only 
expects to be compiled with clang.

David

-- Sent from my Apple II




reply via email to

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