(start_function): Inhibit missing prototype warning for `main'.
authorRichard Stallman <rms@gnu.org>
Tue, 6 Apr 1993 22:07:51 +0000 (22:07 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 6 Apr 1993 22:07:51 +0000 (22:07 +0000)
From-SVN: r4038

gcc/c-decl.c

index cfdd02dd43584b5378b92e282d97ee3340bbd8ac..a45201cd1eba944fffb7ba4f77d8569a088c61f9 100644 (file)
@@ -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.  */