Bug 1243 – (D1 only) inout args can point to null

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-05-22T16:09:04Z
Last change time
2019-05-11T17:20:03Z
Assigned to
No Owner
Creator
BCS

Comments

Comment #0 by shro8822 — 2007-05-22T16:09:04Z
this seg-v's: void main() { char* t = null; fn(*t); } void fn(inout char j) { j = 5; } I just spent about 10 minuets trying to figure out why something a lot like that was failing. In non release mode, DMD should put in an assert(_ !is null) when a pointer is de referenced and used as an out or inout arg.
Comment #1 by verylonglogin.reg — 2013-02-17T00:08:56Z
This is D1 only. For D2 see Issue 7629.