aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@casey.cygnus.com>2000-04-17 02:00:23 +0000
committerJason Merrill <jason@gcc.gnu.org>2000-04-16 22:00:23 -0400
commit11033ba5226589d2e7a7055cda6ddf0379f7cad1 (patch)
treeb5e3acbbea29db8f9892406a22fd3314da806d08 /gcc
parentacfc08f7747c054a4f05a3940b8274748b62172e (diff)
downloadgcc-11033ba5226589d2e7a7055cda6ddf0379f7cad1.zip
gcc-11033ba5226589d2e7a7055cda6ddf0379f7cad1.tar.gz
gcc-11033ba5226589d2e7a7055cda6ddf0379f7cad1.tar.bz2
decl.c (decls_match): Allow a redeclaration of a builtin to specify args while the builtin did not.
* decl.c (decls_match): Allow a redeclaration of a builtin to specify args while the builtin did not. From-SVN: r33195
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ca2ac71..4634c2e 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 69a868f..2760ea5 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);