[Bug c++/87148] [6/7/8/9 Regression] backward compatibility issue to take char [] as incomplete type
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 30 17:14:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87148
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The decision to reject the code in comment #0 was deliberate (as Jonathan
explained in comment #2). We wanted (and still do) G++ to enforce rules that
are at least as strict as C's (and GCC's in C mode).
The other test case:
struct Tst {
int i;
char t[];
};
Tst t = Tst();
arguably should be accepted because the equivalent
Tst t { };
is accepted.
More information about the Gcc-bugs
mailing list