From 95b21bb9da597abff55397a5477b5b01211dc9ca Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 17 Apr 2000 02:00:23 +0000
Subject: [PATCH]         * decl.c (decls_match): Allow a redeclaration of a
 builtin to         specify args while the builtin did not.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33195 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog | 5 +++++
 gcc/cp/decl.c    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ca2ac716d0a0..4634c2e8342c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
+
+	* decl.c (decls_match): Allow a redeclaration of a builtin to
+	specify args while the builtin did not.
+
 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
 
 	* cp-tree.def (THUNK_DECL): Add to documentation.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 69a868f4021d..2760ea5605b3 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2936,7 +2936,8 @@ decls_match (newdecl, olddecl)
 
       if (same_type_p (TREE_TYPE (f1), TREE_TYPE (f2)))
 	{
-	  if (! strict_prototypes_lang_c && DECL_LANGUAGE (olddecl) == lang_c
+	  if ((! strict_prototypes_lang_c || DECL_BUILT_IN (olddecl))
+	      && DECL_LANGUAGE (olddecl) == lang_c
 	      && p2 == NULL_TREE)
 	    {
 	      types_match = self_promoting_args_p (p1);
-- 
GitLab