This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH: Fix g++.other/type.C
- To: gcc-patches at gcc dot gnu dot org
- Subject: C++ PATCH: Fix g++.other/type.C
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 02 Jul 2000 01:08:08 -0700
- Organization: CodeSourcery, LLC
This patch fixes the test-case mentioned above.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
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.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.648
diff -c -p -r1.648 decl.c
*** decl.c 2000/06/30 18:20:38 1.648
--- decl.c 2000/07/02 07:58:43
*************** duplicate_decls (newdecl, olddecl)
*** 3487,3492 ****
--- 3487,3494 ----
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
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.293
diff -c -p -r1.293 typeck.c
*** typeck.c 2000/06/30 00:26:03 1.293
--- typeck.c 2000/07/02 07:58:49
*************** commonparms (p1, p2)
*** 224,230 ****
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);
--- 224,229 ----
*************** commonparms (p1, p2)
*** 273,282 ****
TREE_VALUE (n) = TREE_VALUE (p1);
}
if (! any_change)
! {
! obfree (first_obj);
! return oldargs;
! }
return newargs;
}
--- 272,278 ----
TREE_VALUE (n) = TREE_VALUE (p1);
}
if (! any_change)
! return oldargs;
return newargs;
}