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)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:17:32 +0000 (14:17 +0900)
* 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/typeck.c
gcc/testsuite/ChangeLog

index c5b8e76..a6297d2 100644 (file)
@@ -1,5 +1,17 @@
 2010-04-07  Jason Merrill  <jason@redhat.com>
 
+       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.
+
        * name-lookup.c (current_decl_namespace): Non-static.
        (pop_nested_namespace): Sanity check.
        * cp-tree.h: Declare current_decl_namespace.
index dfdd592..84ffac6 100644 (file)
@@ -1631,8 +1631,6 @@ cxx_sizeof_expr (tree e, tsubst_flags_t complain)
       && DECL_TEMPLATE_INSTANTIATION (e))
     instantiate_decl (e, /*defer_ok*/true, /*expl_inst_mem*/false);
 
-  e = mark_type_use (e);
-
   if (TREE_CODE (e) == COMPONENT_REF
       && TREE_CODE (TREE_OPERAND (e, 1)) == FIELD_DECL
       && DECL_C_BIT_FIELD (TREE_OPERAND (e, 1)))
index 8434746..e5f93ab 100644 (file)
@@ -1,5 +1,7 @@
 2010-04-07  Jason Merrill  <jason@redhat.com>
 
+       * g++.dg/template/dr408.C: New.
+
        * g++.dg/lookup/ns4.C: New.
 
        PR c++/38392