[RFC v1 4/5] gcc/c/c-parser.cc: Extend the scope a little bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>
---
 gcc/c/c-parser.cc | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index f2ce8e54353..49e72267967 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -5060,11 +5060,15 @@ c_parser_direct_declarator_inner (c_parser *parser, bool id_present,
       push_scope ();
       args = c_parser_parms_declarator (parser, id_present, attrs,
 					have_gnu_attrs);
-      pop_scope ();
       if (args == NULL)
-	return NULL;
+	{
+	  pop_scope ();
+	  return NULL;
+	}
       else
 	{
+	  struct c_declarator *ret;
+
 	  if (!(args->types
 		&& args->types != error_mark_node
 		&& TREE_CODE (TREE_VALUE (args->types)) == IDENTIFIER_NODE)
@@ -5076,7 +5080,9 @@ c_parser_direct_declarator_inner (c_parser *parser, bool id_present,
 		inner = build_attrs_declarator (std_attrs, inner);
 	    }
 	  inner = build_function_declarator (args, inner);
-	  return c_parser_direct_declarator_inner (parser, id_present, inner);
+	  ret = c_parser_direct_declarator_inner (parser, id_present, inner);
+	  pop_scope ();
+	  return ret;
 	}
     }
   return inner;
-- 
2.49.0




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux