Skip to content
Snippets Groups Projects
Commit 29e4163a authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: split_nonconstant_init and flexarrays

split_nonconstant_init was doing the wrong thing for both the initialization
and cleanup here; we know the size from the initializer, and we can pass it
along.  This doesn't make the testcase work, since the y destructor is still
broken, but it removes the wrong error for the aggregate initialization.

gcc/cp/ChangeLog:

	* typeck2.c (split_nonconstant_init_1): Handle flexarrays better.

gcc/testsuite/ChangeLog:

	* g++.dg/ext/flexary37.C: Remove expected error.
parent 323026c7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment