diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-05-05 16:50:14 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-05-05 16:50:14 +0000 |
commit | 77fa3ec1b25e4f66ea87b3049c91c7249c1ec92c (patch) | |
tree | 7b7ae97564417221279c14dffcde2b45b956f0d1 /gcc/cp/lex.c | |
parent | 7187a6c83a466b582c68b60c33113492ce9ee1e9 (diff) | |
download | gcc-77fa3ec1b25e4f66ea87b3049c91c7249c1ec92c.zip gcc-77fa3ec1b25e4f66ea87b3049c91c7249c1ec92c.tar.gz gcc-77fa3ec1b25e4f66ea87b3049c91c7249c1ec92c.tar.bz2 |
call.c (make_temporary_var_for_ref_to_temp): Push decl into current scope.
* call.c (make_temporary_var_for_ref_to_temp): Push decl into
current scope.
* lex.c (unqualified_name_lookup_error): Likewise.
From-SVN: r247645
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 0f8a269..75dc159 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -447,13 +447,9 @@ unqualified_name_lookup_error (tree name, location_t loc) this NAME in the innermost block scope. */ if (local_bindings_p ()) { - tree decl; - decl = build_decl (loc, VAR_DECL, name, error_mark_node); - DECL_CONTEXT (decl) = current_function_decl; - push_local_binding (name, decl, 0); - /* Mark the variable as used so that we do not get warnings - about it being unused later. */ - TREE_USED (decl) = 1; + tree decl = build_decl (loc, VAR_DECL, name, error_mark_node); + TREE_USED (decl) = true; + pushdecl (decl); } } |