[OT] OT: Null checks.

Timon Gehr timon.gehr at gmx.ch
Sun May 4 15:22:42 UTC 2025


On 5/4/25 12:24, Derek Fawcus wrote:
> 
> I suspect this may only be the most recent version, possibly the pre- 
> release development HEAD.  I have no idea about any equivalent in the 
> GCC middle and back ends.

Thanks! Found what you are talking about: 
https://releases.llvm.org/10.0.0/docs/LangRef.html#id1105

Look for: "null-pointer-is-valid"

This means that Walter's suggestion to LDC developers to disable the UB 
on null pointer deref seems in fact to be practical if they add this 
attribute on all functions. I don't think something like this exists in 
GCC though.

This does not change the main point of contention though, which is that 
error reporting should be in the hands of the developer as much as 
possible and moving further and further in the direction of taking that 
kind of control away is a tragedy.


More information about the Digitalmars-d mailing list