diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0187-PR-c-42687.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0187-PR-c-42687.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0187-PR-c-42687.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0187-PR-c-42687.patch new file mode 100644 index 000000000..db390d934 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0187-PR-c-42687.patch @@ -0,0 +1,49 @@ +From ccb3ae3a3167213d1c84397653a7cfec0df3a5b7 Mon Sep 17 00:00:00 2001 +From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Wed, 27 Apr 2011 05:20:06 +0000 +Subject: [PATCH 187/200] PR c++/42687 + * parser.c (cp_parser_primary_expression): Set *idk to + CP_ID_KIND_NONE for a parenthesized identifier. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173008 138bc75d-0d04-0410-961f-82ee72b054a4 + +index ba3a98f..9d8457f 100644 +--- a/gcc/cp/parser.c ++++ b/gcc/cp/parser.c +@@ -3696,6 +3696,12 @@ cp_parser_primary_expression (cp_parser *parser, + `&A::B' might be a pointer-to-member, but `&(A::B)' is + not. */ + finish_parenthesized_expr (expr); ++ /* DR 705: Wrapping an unqualified name in parentheses ++ suppresses arg-dependent lookup. We want to pass back ++ CP_ID_KIND_QUALIFIED for suppressing vtable lookup ++ (c++/37862), but none of the others. */ ++ if (*idk != CP_ID_KIND_QUALIFIED) ++ *idk = CP_ID_KIND_NONE; + } + /* The `>' token might be the end of a template-id or + template-parameter-list now. */ +new file mode 100644 +index 0000000..625a181 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/lookup/koenig13.C +@@ -0,0 +1,16 @@ ++// PR c++/42687 ++// DR 705 ++ ++namespace N ++{ ++ struct S { }; ++ void f(const S &) { } ++} ++ ++void f(const N::S &) { } ++ ++int main() ++{ ++ N::S v; ++ (f)(v); // no ambiguity: ADL is prevented with (), only ::f is considered ++} +-- +1.7.0.4 + |