On 30 Apr 2015, at 23:11, Fred Kiefer <[email protected]> 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


_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to