Commit 10326855 by Roger Sayle Committed by Roger Sayle

decl.c (duplicate_decls): Use the new type when prototyping anticipated decls,…

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
parent bdaa131b
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> 2003-03-17 Jason Merrill <jason@redhat.com>
PR c++/10091 PR c++/10091
......
...@@ -3072,6 +3072,10 @@ duplicate_decls (tree newdecl, tree olddecl) ...@@ -3072,6 +3072,10 @@ duplicate_decls (tree newdecl, tree olddecl)
/* Replace the old RTL to avoid problems with inlining. */ /* Replace the old RTL to avoid problems with inlining. */
SET_DECL_RTL (olddecl, DECL_RTL (newdecl)); 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)) if (DECL_THIS_STATIC (newdecl) && !DECL_THIS_STATIC (olddecl))
{ {
......
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