[Issue 10995] CTFE failures for structs with void initialized members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 12 00:35:14 PDT 2013


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



--- Comment #2 from monarchdodra at gmail.com 2013-09-12 00:35:13 PDT ---
(In reply to comment #1)
> This is not a regression. The change in behaviour is an accepts-invalid bug
> that was fixed. In both cases, an uninitialized variable is indeed being read.

I somehow expected that answer, but I'm not sure I entirely agree.

Marking a field to void means the compiler is allowed to optimize out giving
the field a deterministic value on initializing the field, for run-time
performance reasons. But that don't mean it's not actually initialized. I think
that for CTFE, it should *just work*

Not being able to count on "T t = T.init" meaning "t is in an initialized
state", goes against what ".init" represents. No-one said it had a
deterministic value though.

In any case, I think it is not that problematic. "10994" is a real blocker for
me though...

-- 
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