http://d.puremagic.com/issues/show_bug.cgi?id=5541
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|INVALID | --- Comment #2 from [email protected] 2012-02-09 15:21:53 PST --- This is not about struct literals being lvalues, Walter states this is by design anyway. Furthermore, struct literals are certainly allocated on the stack and what bearophile shows is not valid code. struct Foo { int x; } Foo* bar() { return &(Foo(1)); } void qux(ref Foo f,int x){ writeln(f.x); } void main() { Foo* x = bar(); qux(*bar(),2); } compiling and running for 32 bit prints garbage, and looking at the disassembly shows that the literal is indeed allocated on the stack. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
