diff options
author | Joseph Myers <joseph@codesourcery.com> | 2004-10-30 09:50:31 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-10-30 09:50:31 +0100 |
commit | 46097c763954059fdbd8fa5859c3a6a744096d8b (patch) | |
tree | f14d7c8e29c272504247e1d4eb33a70e85877d14 /gcc/c-decl.c | |
parent | 514a3b1100835a73bc91d2bfcc897929a792e85b (diff) | |
download | gcc-46097c763954059fdbd8fa5859c3a6a744096d8b.zip gcc-46097c763954059fdbd8fa5859c3a6a744096d8b.tar.gz gcc-46097c763954059fdbd8fa5859c3a6a744096d8b.tar.bz2 |
re PR c/16666 (dremf type conflict)
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.
From-SVN: r89883
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 08f7909..839b5f3 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) |