diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 05:51:24 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 05:51:24 +0000 |
commit | 793a5b4430f1a43833b43dccee455b6c68e7796c (patch) | |
tree | b10c7430d0d3849f79e7a56a6cec214735f930be /gcc/cp | |
parent | 6978db0d0260af117902fb798eace60bb5192e51 (diff) | |
download | gcc-793a5b4430f1a43833b43dccee455b6c68e7796c.tar.gz |
* name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
* search.c (current_scope): Fix prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 2 | ||||
-rw-r--r-- | gcc/cp/search.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d9e8ce777ce..55316040e9e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2004-10-26 Mark Mitchell <mark@codesourcery.com> + * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT. + * search.c (current_scope): Fix prototype. + PR c++/18093 * search.c (current_scope): Return the innermost non-block scope, not the innermost non-block, non-namespace scope. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 423a4b9be61..7dc19f824be 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3227,7 +3227,7 @@ do_namespace_alias (tree alias, tree namespace) alias = build_lang_decl (NAMESPACE_DECL, alias, void_type_node); DECL_NAMESPACE_ALIAS (alias) = namespace; DECL_EXTERNAL (alias) = 1; - DECL_CONTEXT (alias) = current_scope (); + DECL_CONTEXT (alias) = FROB_CONTEXT (current_scope ()); pushdecl (alias); /* Emit debug info for namespace alias. */ diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 5f8f0815013..68a42f2630f 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -501,7 +501,7 @@ lookup_field_1 (tree type, tree name, bool want_type) NAMESPACE_DECL corresponding to the innermost non-block scope. */ tree -current_scope () +current_scope (void) { /* There are a number of cases we need to be aware of here: current_class_type current_function_decl |