What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
                 CC|                            |
         Resolution|INVALID                     |

--- Comment #2 from 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){
void main() {
    Foo* x = bar();

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:
------- You are receiving this mail because: -------

Reply via email to