[Issue 5238] PATCH: fix return of uninitialised var in interpret.c

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 18 22:17:04 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5238



--- Comment #3 from Brad Roberts <braddr at puremagic.com> 2010-11-18 22:15:48 PST ---
Created an attachment (id=821)
changes to runnable/interpret.d

The problem is with the optimizer, not ctfe.  Switching to this form, so that
there's no code for the optimizer to chew on and complain about works:

static assert(is(typeof(Compileable!(
(){
   S[4] w = void; // uninitialized array of structs
   w[$-2].x = 217; // initialize one member
   return w[2].x;
}()).OK
)));

I'll file a separate bug report for that.

Adding a patch for runnable/interpret.d to be applied in addition to simon's
changes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list