(start_function): Save immediate_size_expand and initialize it to zero
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 18 Oct 1994 19:42:11 +0000 (15:42 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 18 Oct 1994 19:42:11 +0000 (15:42 -0400)
in case nested function.

From-SVN: r8302

gcc/c-decl.c

index fa16ad7c4a3ea607d7988e06a4404e8ebe14c94e..995009a4635423607ce577bbea3641cd49368552 100644 (file)
@@ -5853,6 +5853,7 @@ start_function (declspecs, declarator, nested)
 {
   tree decl1, old_decl;
   tree restype;
+  int old_immediate_size_expand = immediate_size_expand;
 
   current_function_returns_value = 0;  /* Assume, until we see it does. */
   current_function_returns_null = 0;
@@ -5862,6 +5863,9 @@ start_function (declspecs, declarator, nested)
   named_labels = 0;
   shadowed_labels = 0;
 
+  /* Don't expand any sizes in the return type of the function.  */
+  immediate_size_expand = 0;
+
   decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1);
 
   /* If the declarator is not suitable for a function definition,
@@ -5997,6 +6001,8 @@ start_function (declspecs, declarator, nested)
   if (TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (current_function_decl)))
     TREE_ADDRESSABLE (current_function_decl) = 1;
 
+  immediate_size_expand = old_immediate_size_expand;
+
   return 1;
 }