(duplicate_decls):
authorRichard Stallman <rms@gnu.org>
Sun, 21 Jun 1992 21:18:59 +0000 (21:18 +0000)
committerRichard Stallman <rms@gnu.org>
Sun, 21 Jun 1992 21:18:59 +0000 (21:18 +0000)
If redeclaring builtin function, use new declaration's types.

From-SVN: r1228

gcc/c-decl.c

index 5c503ac..4e51623 100644 (file)
@@ -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)