PR c++/11094, DR 408
commit483264879c177c32f0197992f4625dbca09d444b
authorJason Merrill <jason@redhat.com>
Wed, 7 Apr 2010 15:55:20 +0000 (7 11:55 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 7 Apr 2010 15:55:20 +0000 (7 11:55 -0400)
treea5b7680b208ae794f76af4b1d4f4f2e185f2f4a9
parentae099258d3654e328fca96e0ebd457487a70a685
PR c++/11094, DR 408

PR c++/11094, DR 408
* cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
* decl2.c (finish_static_data_member_decl): Set it.
* decl.c (duplicate_decls): Propagate it.
* pt.c (tsubst_decl): Don't substitute the domain of an array
VAR_DECL if it's set.
(regenerate_decl_from_template): Substitute it here.
(type_dependent_expression_p): Return true if it's set.
* semantics.c (finish_decltype_type): Instantiate such a variable.
* typeck.c (cxx_sizeof_expr): Likewise.
(strip_array_domain): New.

From-SVN: r158075
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/dr408.C [new file with mode: 0644]