]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/21879 (Memory management problem)
authorJoseph Myers <joseph@codesourcery.com>
Fri, 3 Jun 2005 22:25:13 +0000 (23:25 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 3 Jun 2005 22:25:13 +0000 (23:25 +0100)
PR c/21879
* c-decl.c (start_function): Restore label_context_stack_se and
label_context_stack_vm  if returning with an error.

From-SVN: r100557

gcc/ChangeLog
gcc/c-decl.c

index 372e308d491136ba668bb69a6b17ce7b0e712d95..2449d13860a3a8fc1311ade318dafdd44e4e8b90 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-03  Joseph S. Myers  <joseph@codesourcery.com>
+
+       PR c/21879
+       * c-decl.c (start_function): Restore label_context_stack_se and
+       label_context_stack_vm  if returning with an error.
+
 2005-06-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        * configure.ac: Check declaration for asprintf, needed by
index d36ceb563d2a706779794405493a886e460d58b7..ec94f95420cb631c6a53bde38d343b38b6ba89b9 100644 (file)
@@ -5802,7 +5802,11 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
   /* If the declarator is not suitable for a function definition,
      cause a syntax error.  */
   if (decl1 == 0)
-    return 0;
+    {
+      label_context_stack_se = label_context_stack_se->next;
+      label_context_stack_vm = label_context_stack_vm->next;
+      return 0;
+    }
 
   decl_attributes (&decl1, attributes, 0);