Deleted Added
full compact
22c22
< /* $FreeBSD: head/contrib/gcc/c-decl.c 149846 2005-09-07 09:23:39Z obrien $ */
---
> /* $FreeBSD: head/contrib/gcc/c-decl.c 161660 2006-08-26 21:37:21Z kan $ */
959a960,968
> /* Enumerators have no linkage, so may only be declared once in a
> given scope. */
> if (TREE_CODE (olddecl) == CONST_DECL)
> {
> error ("%Jredeclaration of enumerator `%D'", newdecl, newdecl);
> locate_old_decl (olddecl, error);
> return false;
> }
>
2958a2968
> int old_dont_save_pending_sizes_p = 0;
2964a2975,2982
> /* If this is a nested function, we do want to keep SAVE_EXPRs for
> the argument sizes, regardless of the parent's setting. */
> if (cfun)
> {
> old_dont_save_pending_sizes_p = cfun->x_dont_save_pending_sizes_p;
> cfun->x_dont_save_pending_sizes_p = 0;
> }
>
2973a2992,2993
> if (cfun)
> cfun->x_dont_save_pending_sizes_p = old_dont_save_pending_sizes_p;
4787c4807
< if (TYPE_FIELDS (ref))
---
> if (TYPE_SIZE (ref))
4793a4814,4822
> else if (C_TYPE_BEING_DEFINED (ref))
> {
> if (code == UNION_TYPE)
> error ("nested redefinition of `union %s'",
> IDENTIFIER_POINTER (name));
> else
> error ("nested redefinition of `struct %s'",
> IDENTIFIER_POINTER (name));
> }
5008,5012d5036
< /* Detect invalid nested redefinition. */
< if (TREE_TYPE (x) == t)
< error ("nested redefinition of `%s'",
< IDENTIFIER_POINTER (TYPE_NAME (t)));
<
5133a5158,5160
> C_TYPE_FIELDS_READONLY (x) = C_TYPE_FIELDS_READONLY (t);
> C_TYPE_FIELDS_VOLATILE (x) = C_TYPE_FIELDS_VOLATILE (t);
> C_TYPE_VARIABLE_SIZE (x) = C_TYPE_VARIABLE_SIZE (t);
5206a5234,5236
> if (C_TYPE_BEING_DEFINED (enumtype))
> error ("nested redefinition of `enum %s'", IDENTIFIER_POINTER (name));
>
5979,5981d6008
< /* The function containing FNDECL, if any. */
< tree context = decl_function_context (fndecl);
<
6006,6011c6033,6035
< /* If this is a nested function, save away the sizes of any
< variable-size types so that we can expand them when generating
< RTL. */
< if (context)
< {
< tree t;
---
> /* Save away the sizes of any variable-size types so that we can
> expand them when generating RTL. */
> DECL_LANG_SPECIFIC (fndecl)->pending_sizes = get_pending_sizes ();
6013,6020d6036
< DECL_LANG_SPECIFIC (fndecl)->pending_sizes
< = nreverse (get_pending_sizes ());
< for (t = DECL_LANG_SPECIFIC (fndecl)->pending_sizes;
< t;
< t = TREE_CHAIN (t))
< SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = context;
< }
<
6170,6177c6186,6187
< {
< /* Make sure that we will evaluate variable-sized types involved
< in our function's type. */
< expand_pending_sizes (DECL_LANG_SPECIFIC (fndecl)->pending_sizes);
<
< /* Squirrel away our current state. */
< push_function_context ();
< }
---
> /* Squirrel away our current state. */
> push_function_context ();
6178a6189,6191
> /* Make sure that we will evaluate variable-sized types involved
> in our function's type. */
> put_pending_sizes (DECL_LANG_SPECIFIC (fndecl)->pending_sizes);
6399c6412
< stmt = add_stmt (build_stmt (COMPOUND_STMT, NULL_TREE));
---
> stmt = add_stmt (build_stmt (COMPOUND_STMT, error_mark_node));