From: Richard Stallman Date: Tue, 6 Apr 1993 22:07:51 +0000 (+0000) Subject: (start_function): Inhibit missing prototype warning for `main'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39ab948e9d625b83d5bae53e88f3695032e0722e;p=gcc.git (start_function): Inhibit missing prototype warning for `main'. From-SVN: r4038 --- 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. */