OSDN Git Service

PR c++/11094, DR 408
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 15:55:20 +0000 (15:55 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 15:55:20 +0000 (15:55 +0000)
commit8b25863e71a1ac1600d931290fb3d36c7c30671a
treea5b7680b208ae794f76af4b1d4f4f2e185f2f4a9
parent305104fdc55b3a2237c6fff6f36545556a28d91c
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158075 138bc75d-0d04-0410-961f-82ee72b054a4
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]