aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-04-06 22:07:51 +0000
committerRichard Stallman <rms@gnu.org>1993-04-06 22:07:51 +0000
commit39ab948e9d625b83d5bae53e88f3695032e0722e (patch)
tree91da84df2cd03d5063218b66cdce02c6dbc96a1f /gcc
parent1387e80cf59e5e97a53a1f21a7d6d2488abc6ce2 (diff)
downloadgcc-39ab948e9d625b83d5bae53e88f3695032e0722e.zip
gcc-39ab948e9d625b83d5bae53e88f3695032e0722e.tar.gz
gcc-39ab948e9d625b83d5bae53e88f3695032e0722e.tar.bz2
(start_function): Inhibit missing prototype warning for `main'.
From-SVN: r4038
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index cfdd02d..a45201c 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. */