From 39ab948e9d625b83d5bae53e88f3695032e0722e Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Tue, 6 Apr 1993 22:07:51 +0000 Subject: [PATCH] (start_function): Inhibit missing prototype warning for `main'. From-SVN: r4038 --- gcc/c-decl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/c-decl.c b/gcc/c-decl.c index cfdd02dd435..a45201cd1eb 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5625,7 +5625,8 @@ start_function (declspecs, declarator, nested) /* 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) + && strcmp ("main", IDENTIFIER_POINTER (DECL_NAME (decl1)))) warning_with_decl (decl1, "no previous prototype for `%s'"); /* Optionally warn of any def with no previous prototype if the function has already been used. */ -- 2.30.2