aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-26 11:02:39 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-26 11:02:39 -0400
commitd70a5179425c0874bac72143dd859f4addc26756 (patch)
treebe3bb2041edc29cac3dd479f558bfe3d921c648b /gcc
parent6e2f8c15bcd86287320e65589d52162fa3a7ff18 (diff)
downloadgcc-d70a5179425c0874bac72143dd859f4addc26756.zip
gcc-d70a5179425c0874bac72143dd859f4addc26756.tar.gz
gcc-d70a5179425c0874bac72143dd859f4addc26756.tar.bz2
* decl.c (finish_function): Don't look at function_depth.
From-SVN: r165967
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5061af2..3b73211 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-26 Jason Merrill <jason@redhat.com>
+
+ * decl.c (finish_function): Don't look at function_depth.
+
2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Implement opaque-enum-specifiers for C++0x.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1409330..e513bc0 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12660,7 +12660,6 @@ finish_function (int flags)
tree fndecl = current_function_decl;
tree fntype, ctype = NULL_TREE;
int inclass_inline = (flags & 2) != 0;
- int nested;
/* When we get some parse errors, we can end up without a
current_function_decl, so cope. */
@@ -12672,7 +12671,6 @@ finish_function (int flags)
record_key_method_defined (fndecl);
- nested = function_depth > 1;
fntype = TREE_TYPE (fndecl);
/* TREE_READONLY (fndecl) = 1;
@@ -12883,11 +12881,7 @@ finish_function (int flags)
--function_depth;
/* Clean up. */
- if (! nested)
- /* Let the error reporting routines know that we're outside a
- function. For a nested function, this value is used in
- cxx_pop_function_context and then reset via pop_function_context. */
- current_function_decl = NULL_TREE;
+ current_function_decl = NULL_TREE;
defer_mark_used_calls = false;
if (deferred_mark_used_calls)