]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-common.c
2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2008 17:57:47 +0000 (17:57 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2008 17:57:47 +0000 (17:57 +0000)
commit23efcc0264e7ed4273163d8f5f2057cc19639a17
treed1fe225e6b0637a6333ddd4ed28cd99d4d43c234
parent2c49840da24137b7b3f695a320c8e4517acacbd8
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
19 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/c-opts.c
gcc/c.opt
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/pr30551-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/pr30551.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr30551.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/reassoc-3.c