On Wednesday, 26 July 2017 at 00:35:13 UTC, Steven Schveighoffer
wrote:
On 7/25/17 5:23 PM, Moritz Maxeiner wrote:
On Tuesday, 25 July 2017 at 20:16:41 UTC, Steven Schveighoffer
wrote:
The behavior is defined. It will crash with a segfault.
In C land that behaviour is a platform (hardware/OS/libc)
specific implementation detail (it's what you generally expect
to happen, but AFAIK it isn't defined in official ISO/IEC C).
In cases where C does not crash when dereferencing null, then D
would not crash when dereferencing null. [...]
OK, my (wrong) assumption was that a D compiler would on those
platforms be required to inject null checks+crash in order to
satisfy the property that null dereferences crashes D programs
rely on.
Since that seems to not be the case: Is this documented in the D
spec somewhere (I couldn't find it)? If not, imho it should.