Bug 3899 – CTFE: poor error message for use of uninitialized variable

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Windows
Creation time
2010-03-08T11:16:00Z
Last change time
2014-04-18T09:12:07Z
Keywords
diagnostic, patch
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2010-03-08T11:16:54Z
The code below generates the error "void initializer has no value" which is a bit unclear. (I'm entering this bug only because I've fixed it in another patch). ===== int gar() { ArrayRet z = void; ArrayRet w = z; z.x += 2; return z.x; } static assert(gar()==2);
Comment #1 by clugdbug — 2010-03-08T11:33:10Z
Patched in bug 3901.
Comment #2 by clugdbug — 2010-04-09T19:13:24Z
Fixed DMD1.058 and DMD2.042.