diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0104-PR-c-48523.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0104-PR-c-48523.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0104-PR-c-48523.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0104-PR-c-48523.patch new file mode 100644 index 000000000..62bd4f93b --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0104-PR-c-48523.patch @@ -0,0 +1,42 @@ +From 514b92d849b08f3fb7a8194a822b0b8609776564 Mon Sep 17 00:00:00 2001 +From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Tue, 12 Apr 2011 00:20:18 +0000 +Subject: [PATCH 104/200] PR c++/48523 + * tree.c (maybe_dummy_object): Use build_x_indirect_ref rather + than cp_build_indirect_ref. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172293 138bc75d-0d04-0410-961f-82ee72b054a4 + +index 56639ff..15ee741 100644 +--- a/gcc/cp/tree.c ++++ b/gcc/cp/tree.c +@@ -2421,7 +2421,7 @@ maybe_dummy_object (tree type, tree* binfop) + else if (current != current_class_type + && context == nonlambda_method_basetype ()) + /* In a lambda, need to go through 'this' capture. */ +- decl = (cp_build_indirect_ref ++ decl = (build_x_indirect_ref + ((lambda_expr_this_capture + (CLASSTYPE_LAMBDA_EXPR (current_class_type))), + RO_NULL, tf_warning_or_error)); +new file mode 100644 +index 0000000..29cd2a9 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C +@@ -0,0 +1,13 @@ ++// PR c++/48523 ++// { dg-options -std=c++0x } ++ ++template<typename> ++struct X ++{ ++ bool b; ++ ++ void f() ++ { ++ [this]{ return b; }; ++ } ++}; +-- +1.7.0.4 + |