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

c++: Check constant array bounds later.

We give a better diagnostic for non-constant array bounds in
compute_array_index_type_loc, we don't need to diagnose it in the parser.
But to avoid a regression on parse/varmod1.C we need to actually check
non-dependent expressions in a template.

gcc/cp/ChangeLog:

	* decl.c (compute_array_index_type_loc): Diagnose expressions
	in a template that can't be constant.
	* parser.c (cp_parser_direct_declarator): Don't check
	non-constant array bounds here.

gcc/testsuite/ChangeLog:

	* c-c++-common/gomp/depend-iterator-2.c: Adjust.
	* g++.dg/ext/vla1.C: Adjust.
	* g++.dg/template/array9.C: Adjust.
	* g++.dg/template/error41.C: Adjust.
parent beb019d3
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