OSDN Git Service

PR c++/43016
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 22:16:15 +0000 (22:16 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 22:16:15 +0000 (22:16 +0000)
* decl.c (start_preparsed_function): Do defer nested functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158095 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index 4ea2565..fa01fcb 100644 (file)
@@ -1,5 +1,8 @@
 2010-04-07  Jason Merrill  <jason@redhat.com>
 
 2010-04-07  Jason Merrill  <jason@redhat.com>
 
+       PR c++/43016
+       * decl.c (start_preparsed_function): Do defer nested functions.
+
        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.
        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.
index 7a82ed6..32aeda2 100644 (file)
@@ -12023,9 +12023,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
 
       if ((DECL_DECLARED_INLINE_P (decl1)
           || DECL_TEMPLATE_INSTANTIATION (decl1))
 
       if ((DECL_DECLARED_INLINE_P (decl1)
           || DECL_TEMPLATE_INSTANTIATION (decl1))
-         && ! DECL_INTERFACE_KNOWN (decl1)
-         /* Don't try to defer nested functions for now.  */
-         && ! decl_function_context (decl1))
+         && ! DECL_INTERFACE_KNOWN (decl1))
        DECL_DEFER_OUTPUT (decl1) = 1;
       else
        DECL_INTERFACE_KNOWN (decl1) = 1;
        DECL_DEFER_OUTPUT (decl1) = 1;
       else
        DECL_INTERFACE_KNOWN (decl1) = 1;