aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-03-18 04:31:21 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-03-18 04:31:21 +0000
commit10326855ab6f03a63a891d80f578c34104b18e22 (patch)
treebc60597044d1f306dc4da90b08864e102c3f194d /gcc/cp
parentbdaa131bd0509fc849ea589e103c6339c45118e8 (diff)
downloadgcc-10326855ab6f03a63a891d80f578c34104b18e22.zip
gcc-10326855ab6f03a63a891d80f578c34104b18e22.tar.gz
gcc-10326855ab6f03a63a891d80f578c34104b18e22.tar.bz2
decl.c (duplicate_decls): Use the new type when prototyping anticipated decls, even when the types match.
* decl.c (duplicate_decls): Use the new type when prototyping anticipated decls, even when the types match. This defines the exception list for the built-in function. From-SVN: r64522
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d6efa61..25cc235 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-17 Roger Sayle <roger@eyesopen.com>
+
+ * decl.c (duplicate_decls): Use the new type when prototyping
+ anticipated decls, even when the types match. This defines the
+ exception list for the built-in function.
+
2003-03-17 Jason Merrill <jason@redhat.com>
PR c++/10091
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e00a5f3..a0dba2f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3072,6 +3072,10 @@ duplicate_decls (tree newdecl, tree olddecl)
/* Replace the old RTL to avoid problems with inlining. */
SET_DECL_RTL (olddecl, DECL_RTL (newdecl));
}
+ /* Even if the types match, prefer the new declarations type
+ for anitipated built-ins, for exception lists, etc... */
+ else if (DECL_ANTICIPATED (olddecl))
+ TREE_TYPE (olddecl) = TREE_TYPE (newdecl);
if (DECL_THIS_STATIC (newdecl) && !DECL_THIS_STATIC (olddecl))
{