From 81506bec36d754ef42b34e81299f777871a6ebe1 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Sat, 30 Oct 2004 08:50:31 +0000 Subject: PR c/16666 * c-decl.c (start_function): Don't check for DECL_BUILT_IN when determining whether to copy parameter types from a previous prototype declaration. testsuite: * gcc.dg/dremf-type-compat-1.c, gcc.dg/dremf-type-compat-2.c, gcc.dg/dremf-type-compat-3.c, gcc.dg/dremf-type-compat-4.c, gcc.dg/old-style-prom-1.c, gcc.dg/old-style-prom-2.c, gcc.dg/old-style-prom-3.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89883 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-decl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/c-decl.c') diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 08f79098243..839b5f3b2ab 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5698,11 +5698,9 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, DECL_INITIAL (decl1) = error_mark_node; /* If this definition isn't a prototype and we had a prototype declaration - before, copy the arg type info from that prototype. - But not if what we had before was a builtin function. */ + before, copy the arg type info from that prototype. */ old_decl = lookup_name_in_scope (DECL_NAME (decl1), current_scope); if (old_decl != 0 && TREE_CODE (TREE_TYPE (old_decl)) == FUNCTION_TYPE - && !DECL_BUILT_IN (old_decl) && comptypes (TREE_TYPE (TREE_TYPE (decl1)), TREE_TYPE (TREE_TYPE (old_decl))) && TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0) -- cgit v1.2.1