diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-30 08:50:31 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-30 08:50:31 +0000 |
commit | 81506bec36d754ef42b34e81299f777871a6ebe1 (patch) | |
tree | f14d7c8e29c272504247e1d4eb33a70e85877d14 /gcc/c-decl.c | |
parent | bba6ea96b5c0b72801c10c271e79975c5ad0ea6c (diff) | |
download | gcc-81506bec36d754ef42b34e81299f777871a6ebe1.tar.gz |
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) |