commit d93d421435f8c38b2019526c7645a59e79a92cc5
Author: Jason Merrill <jason@redhat.com>
Date: Tue Nov 1 17:16:12 2016 -0400
rem-ant
@@ -1485,10 +1485,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
}
else if (!types_match)
{
- /* Avoid warnings redeclaring built-ins which have not been
- explicitly declared. */
- if (DECL_ANTICIPATED (olddecl))
- {
/* Deal with fileptr_type_node. FILE type is not known
at the time we create the builtins. */
tree t1, t2;
@@ -1521,8 +1517,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
}
else if (! same_type_p (TREE_VALUE (t1), TREE_VALUE (t2)))
break;
- }
- else if ((DECL_EXTERN_C_P (newdecl)
+
+ if ((DECL_EXTERN_C_P (newdecl)
&& DECL_EXTERN_C_P (olddecl))
|| compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)),
TYPE_ARG_TYPES (TREE_TYPE (olddecl))))
@@ -1540,7 +1536,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
: G_("shadowing library function %q#D"), olddecl);
}
else
- /* Discard the old built-in function. */
+ /* Not a duplicate. */
return NULL_TREE;
/* Replace the old RTL to avoid problems with inlining. */