Commit e0e2f469 by Jim Wilson

(grokdeclarator, ARRARY_REF): If exern, then end

temporary allocation before building type.

From-SVN: r3760
parent fe1f7f24
......@@ -4033,6 +4033,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
{
register tree itype = NULL_TREE;
register tree size = TREE_OPERAND (declarator, 1);
/* An uninitialized decl with `extern' is a reference. */
int extern_ref = !initialized && (specbits & (1 << (int) RID_EXTERN));
declarator = TREE_OPERAND (declarator, 0);
......@@ -4056,6 +4058,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (type == error_mark_node)
continue;
/* If this is a block level extern, it must live past the end
of the function so that we can check it against other extern
declarations (IDENTIFIER_LIMBO_VALUE). */
if (extern_ref && allocation_temporary_p ())
end_temporary_allocation ();
/* If size was specified, set ITYPE to a range-type for that size.
Otherwise, ITYPE remains null. finish_decl may figure it out
from an initial value. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment