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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3899 - CTFE: poor error message for use of uninitialized variable
Summary: CTFE: poor error message for use of uninitialized variable
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic, patch
Depends on:
Blocks:
Reported: 2010年03月08日 11:16 UTC by Don
Modified: 2014年04月18日 09:12 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2010年03月08日 11:16:54 UTC
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 Don 2010年03月08日 11:33:10 UTC
Patched in bug 3901.
Comment 2 Don 2010年04月09日 19:13:24 UTC
Fixed DMD1.058 and DMD2.042.


AltStyle によって変換されたページ (->オリジナル) /