(pop_init_level): Ensure never on momentary_obstack when calling
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 27 Nov 1993 11:19:03 +0000 (06:19 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 27 Nov 1993 11:19:03 +0000 (06:19 -0500)
complete_array_type.

From-SVN: r6169

gcc/c-typeck.c

index 6550df23388705d94d8714b9f70f04b47ccce4c8..15428e4dfd32c35b7f53dab9fa2e4846dd701255 100644 (file)
@@ -5235,11 +5235,14 @@ pop_init_level (implicit)
              && TYPE_DOMAIN (constructor_type) == 0)
            {
              int failure;
+             int momentary_p;
 
              push_obstacks_nochange ();
              if (TREE_PERMANENT (constructor_type))
                end_temporary_allocation ();
 
+             momentary_p = suspend_momentary ();
+
              /* We shouldn't have an incomplete array type within
                 some other type.  */
              if (constructor_stack->next)
@@ -5252,6 +5255,7 @@ pop_init_level (implicit)
                abort ();
 
              size = int_size_in_bytes (constructor_type);
+             resume_momentary (momentary_p);
              pop_obstacks ();
            }