aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-06-21 21:18:59 +0000
committerRichard Stallman <rms@gnu.org>1992-06-21 21:18:59 +0000
commit52b6a22f2280b6005c54f48eadb7d9b41f5d664e (patch)
tree7f73e8d969df5b426eda17a8ceafd1b0bbeb9abb
parente841f997bc052028514a26a49ba8081cc17eb66a (diff)
downloadgcc-52b6a22f2280b6005c54f48eadb7d9b41f5d664e.zip
gcc-52b6a22f2280b6005c54f48eadb7d9b41f5d664e.tar.gz
gcc-52b6a22f2280b6005c54f48eadb7d9b41f5d664e.tar.bz2
(duplicate_decls):
If redeclaring builtin function, use new declaration's types. From-SVN: r1228
-rw-r--r--gcc/c-decl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5c503ac..4e51623 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)