diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-13 17:57:47 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-13 17:57:47 +0000 |
commit | 23efcc0264e7ed4273163d8f5f2057cc19639a17 (patch) | |
tree | d1fe225e6b0637a6333ddd4ed28cd99d4d43c234 /gcc/c-common.h | |
parent | 2c49840da24137b7b3f695a320c8e4517acacbd8 (diff) | |
download | gcc-23efcc0264e7ed4273163d8f5f2057cc19639a17.tar.gz |
2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 30551
* doc/invoke.texi (Wmain): Update.
* c-decl.c (start_decl): warn_main is only 0 or 1.
(start_function): Likewise. Fix formatting.
(finish_function): Delete redundant warning.
* c.opt (Wmain): Add Var(warn_main) and Init(-1).
* c-opts (c_common_handle_option): -Wall only has effect if
warn_main is uninitialized. OPT_Wmain is automatically
handled. -pedantic also enables Wmain.
(c_common_post_options): Handle all logic for Wmain here.
* c-common.c (warn_main): Delete.
(check_main_parameter_types): Make pedwarns conditional on
OPT_Wmain.
* c-common.h (warn_main): Delete.
cp/
* decl.c (grokfndecl): Call check_main_parameters_type only if
-Wmain.
testsuite/
* gcc.dg/pr30551.c: New.
* gcc.dg/pr30551-2.c: New.
* gcc.dg/pr30551-3.c: New.
* gcc.dg/pr30551-4.c: New.
* gcc.dg/pr30551-5.c: New.
* gcc.dg/pr30551-6.c: New.
* gcc.dg/tree-ssa/reassoc-3.c: Don't compile with -pedantic-errors.
* g++.dg/warn/pr30551.C: New.
* g++.dg/warn/pr30551-2.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139063 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 0f2a359c16f..b0abe3e1a51 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -498,11 +498,6 @@ extern int flag_isoc99; extern int flag_hosted; -/* Warn if main is suspicious. */ - -extern int warn_main; - - /* ObjC language option variables. */ |