[Bug c++/84930] Brace-closed initialization of cstring (i.e."abcdefghi") to coresponding aggregate types fails in certain situation
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 28 23:49:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84930
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libstdc++ |c++
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is a front-end bug not library bug, the failing cases can be reduced to:
struct array { char data[10]; };
struct A {
array x;
A(array arr) : x(arr) {}
};
A struct_from_ctr1{ {{"abcdefghi"}} };
Or even more simply:
struct array { char data[2]; };
void f(array) {}
void g() {
f({{"a"}});
}
More information about the Gcc-bugs
mailing list