decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a TYPE_DECL.

* decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
	TYPE_DECL.
	* typeck.c (commonparms): Remove obstack manipulations.

From-SVN: r34830
This commit is contained in:
Mark Mitchell 2000-07-02 08:07:55 +00:00 committed by Mark Mitchell
parent 9de09d7375
commit 970d6386eb
3 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2000-07-02 Mark Mitchell <mark@codesourcery.com>
* decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
TYPE_DECL.
* typeck.c (commonparms): Remove obstack manipulations.
2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
* Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.

View File

@ -3487,6 +3487,8 @@ duplicate_decls (newdecl, olddecl)
CLASSTYPE_FRIEND_CLASSES (newtype)
= CLASSTYPE_FRIEND_CLASSES (oldtype);
}
DECL_ORIGINAL_TYPE (newdecl) = DECL_ORIGINAL_TYPE (olddecl);
}
/* Copy all the DECL_... slots specified in the new decl
@ -8033,7 +8035,6 @@ destroy_local_var (decl)
}
/* Finish processing of a declaration;
install its line number and initial value.
If the length of an array type is not known before,

View File

@ -263,7 +263,6 @@ commonparms (p1, p2)
tree oldargs = p1, newargs, n;
int i, len;
int any_change = 0;
char *first_obj = (char *) oballoc (0);
len = list_length (p1);
newargs = tree_last (p1);
@ -312,10 +311,7 @@ commonparms (p1, p2)
TREE_VALUE (n) = TREE_VALUE (p1);
}
if (! any_change)
{
obfree (first_obj);
return oldargs;
}
return oldargs;
return newargs;
}