https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84930

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2018-03-28 00:00:00         |2019-11-19

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It doesn't work in a return statement either:

struct array { char data[2]; };

void f(array) {}

array g() {
    f({"a"});
    return {"a"};
}


84930.cc: In function ‘array g()’:
84930.cc:6:12: error: could not convert ‘{"a"}’ from ‘<brace-enclosed
initializer list>’ to ‘array’
     f({"a"});
            ^
84930.cc:7:16: error: could not convert ‘{"a"}’ from ‘<brace-enclosed
initializer list>’ to ‘array’
     return {"a"};
                ^

Reply via email to