aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-01-13 12:34:02 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-01-13 07:34:02 -0500
commit757e6639b9513610e16cd9795148668bcb82d944 (patch)
tree5c0e24efb7b63aabd09a3c22a36caa8fb7ac34c6 /gcc/c-decl.c
parent9e7adcb3f02fed791a723af46c6bdb16b81019bb (diff)
downloadgcc-757e6639b9513610e16cd9795148668bcb82d944.zip
gcc-757e6639b9513610e16cd9795148668bcb82d944.tar.gz
gcc-757e6639b9513610e16cd9795148668bcb82d944.tar.bz2
c-decl.c (start_function): Don't warn if old prototype is builtin that's not in C's namespace.
* c-decl.c (start_function): Don't warn if old prototype is builtin that's not in C's namespace. * libgcc2.c (_varargs): Update definition of __builtin_saveregs. (_bb): Add prototype for ctime. * config/alpha/osf.h (TRANSFER_FROM_TRAMPOLINE): Add missing protos. From-SVN: r38980
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index bcd414e..97ae2ba 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5837,12 +5837,18 @@ start_function (declspecs, declarator, prefix_attributes, attributes)
/* Optionally warn of old-fashioned def with no previous prototype. */
if (warn_strict_prototypes
&& TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0
- && !(old_decl != 0 && TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0))
+ && !(old_decl != 0
+ && (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
+ || (DECL_BUILT_IN (old_decl)
+ && ! C_DECL_ANTICIPATED (old_decl)))))
warning ("function declaration isn't a prototype");
/* Optionally warn of any global def with no previous prototype. */
else if (warn_missing_prototypes
&& TREE_PUBLIC (decl1)
- && !(old_decl != 0 && TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0)
+ && !(old_decl != 0
+ && (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
+ || (DECL_BUILT_IN (old_decl)
+ && ! C_DECL_ANTICIPATED (old_decl))))
&& ! MAIN_NAME_P (DECL_NAME (decl1)))
warning_with_decl (decl1, "no previous prototype for `%s'");
/* Optionally warn of any def with no previous prototype