From 52b6a22f2280b6005c54f48eadb7d9b41f5d664e Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 21 Jun 1992 21:18:59 +0000 Subject: [PATCH] (duplicate_decls): If redeclaring builtin function, use new declaration's types. From-SVN: r1228 --- gcc/c-decl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 5c503ac714b..4e516234f40 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1202,7 +1202,11 @@ duplicate_decls (newdecl, olddecl) return 0; } else if (!types_match) - warning_with_decl (newdecl, "conflicting types for built-in function `%s'"); + { + /* If types don't match for a built-in, throw away the built-in. */ + warning_with_decl (newdecl, "conflicting types for built-in function `%s'"); + return 0; + } } else if (TREE_CODE (olddecl) == FUNCTION_DECL && DECL_SOURCE_LINE (olddecl) == 0) -- 2.30.2