OSDN Git Service

(start_function): Inhibit missing prototype warning for `main'.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Apr 1993 22:07:51 +0000 (22:07 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Apr 1993 22:07:51 +0000 (22:07 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4038 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-decl.c

index cfdd02d..a45201c 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.  */