[Bug c++/92604] New: GCC accepts invalid conversion from designated initializer list
aymarino at umich dot edu
gcc-bugzilla@gcc.gnu.org
Wed Nov 20 23:09:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92604
Bug ID: 92604
Summary: GCC accepts invalid conversion from designated
initializer list
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: aymarino at umich dot edu
Target Milestone: ---
This is accepted on trunk:
const int& c { .oops = 3 };
It appears that the designator is simply ignored and 'c' is initialized as if
the initializer were '{ 3 }'.
More information about the Gcc-bugs
mailing list