diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-01 22:01:18 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-01 22:01:18 +0000 |
| commit | afe02847ebc577a5c0c91b607f9a0a3e2d2a5231 (patch) | |
| tree | 95303aa7e1bbe09aa276536d5a60e3435a80954f | |
| parent | 4ac79c3242b1a2288fa77087fd1fd5eb06c8f4de (diff) | |
| download | ppe42-gcc-afe02847ebc577a5c0c91b607f9a0a3e2d2a5231.tar.gz ppe42-gcc-afe02847ebc577a5c0c91b607f9a0a3e2d2a5231.zip | |
PR c++/28215
* method.c (make_thunk): Unset DECL_USE_TEMPLATE and
DECL_TEMPLATE_INFO.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115118 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/method.c | 3 | ||||
| -rw-r--r-- | gcc/cp/search.c | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 29888c7b2bc..896749ede5d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-07-01 Jason Merrill <jason@redhat.com> + + PR c++/28215 + * method.c (make_thunk): Unset DECL_USE_TEMPLATE and + DECL_TEMPLATE_INFO. + 2006-06-30 Jason Merrill <jason@redhat.com> PR c++/26577 diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 1f06229eb1c..9029e85a653 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -161,6 +161,9 @@ make_thunk (tree function, bool this_adjusting, DECL_DECLARED_INLINE_P (thunk) = 0; /* Nor has it been deferred. */ DECL_DEFERRED_FN (thunk) = 0; + /* Nor is it a template instantiation. */ + DECL_USE_TEMPLATE (thunk) = 0; + DECL_TEMPLATE_INFO (thunk) = NULL; /* Add it to the list of thunks associated with FUNCTION. */ TREE_CHAIN (thunk) = DECL_THUNKS (function); diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 21d1b776246..2af5e04d363 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -792,11 +792,12 @@ friend_accessible_p (tree scope, tree decl, tree binfo) if (protected_accessible_p (decl, TREE_VALUE (t), binfo)) return 1; - /* Nested classes are implicitly friends of their enclosing types, as + /* Nested classes have the same access as their enclosing types, as per core issue 45 (this is a change from the standard). */ if (TYPE_P (scope)) for (t = TYPE_CONTEXT (scope); t && TYPE_P (t); t = TYPE_CONTEXT (t)) - if (protected_accessible_p (decl, t, binfo)) + if (protected_accessible_p (decl, t, binfo) + || friend_accessible_p (t, decl, binfo)) return 1; if (TREE_CODE (scope) == FUNCTION_DECL |

