diff options
author | Richard Stallman <rms@gnu.org> | 1992-07-01 02:20:59 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-07-01 02:20:59 +0000 |
commit | 4c41bbfa769371a67cae3de8256c8da2b4d02385 (patch) | |
tree | bc2049dadf794dfc8d9fe04afb96a095a4fc6721 /gcc | |
parent | 7212eb444263275379e7b7b7c0daf2b841a760c2 (diff) | |
download | gcc-4c41bbfa769371a67cae3de8256c8da2b4d02385.zip gcc-4c41bbfa769371a67cae3de8256c8da2b4d02385.tar.gz gcc-4c41bbfa769371a67cae3de8256c8da2b4d02385.tar.bz2 |
(ALLOCA_FLAGS, ALLOCA_FINISH, AS): Deleted.
(INSTALL): Deleted.
(duplicate_decls): If newdecl for builtin function
has same return mode as the builtin, keep the builtin
but use newdecl's return type.
From-SVN: r1366
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-decl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 2d6d1e2..4cd33a0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1205,6 +1205,19 @@ duplicate_decls (newdecl, olddecl) } else if (!types_match) { + /* Accept the return type of the new declaration if same modes. */ + tree oldreturntype = TREE_TYPE (TREE_TYPE (olddecl)); + tree newreturntype = TREE_TYPE (TREE_TYPE (newdecl)); + if (TYPE_MODE (oldreturntype) == TYPE_MODE (newreturntype)) + { + TREE_TYPE (TREE_TYPE (olddecl)) = newreturntype; + types_match = comptypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl)); + if (!types_match) + TREE_TYPE (TREE_TYPE (olddecl)) = oldreturntype; + } + } + if (!types_match) + { /* 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; |