]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/43016 ([C++0x] Inappropriate multiple definition error for lambda function...
authorJason Merrill <jason@redhat.com>
Wed, 7 Apr 2010 22:16:15 +0000 (18:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 7 Apr 2010 22:16:15 +0000 (18:16 -0400)
PR c++/43016
* decl.c (start_preparsed_function): Do defer nested functions.

From-SVN: r158095

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

index 4ea2565e51e46df716cefbce29ed79db4a2d8be1..fa01fcb56ef4f15ff45683411e9e396e168a4e6f 100644 (file)
@@ -1,5 +1,8 @@
 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.
index 7a82ed6c511bad003215c4d37f8c86f5832f5ca8..32aeda2b18b843141ff8a971436b06858c8e889a 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))
-         && ! 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;