diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-13 17:38:41 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-05-13 17:38:41 +0000 |
commit | 9574478218103f58cdcfce32d76823c48853d06f (patch) | |
tree | d1dbf250ac0d8d854f2899938381ccef5fbb74fa /gcc/c-family | |
parent | daa5129526e2bc12add2253ed76d8bc06e15712c (diff) | |
download | gcc-9574478218103f58cdcfce32d76823c48853d06f.zip gcc-9574478218103f58cdcfce32d76823c48853d06f.tar.gz gcc-9574478218103f58cdcfce32d76823c48853d06f.tar.bz2 |
c.opt (Wclobbered,Wempty-body,Wignored-qualifiers, [...]): Use EnabledBy.
2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
c-family/
* c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
Wmissing-field-initializers,Wmissing-parameter-type,
Wold-style-declaration,Woverride-init): Use EnabledBy.
* c-opts.c (c_common_post_options): Do not set here explicitly.
gcc/
* common.opt (Wtype-limits): Use EnabledBy.
From-SVN: r187441
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-family/c-opts.c | 18 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 14 |
3 files changed, 16 insertions, 23 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 2c85d51..2265685 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org> + + * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers, + Wmissing-field-initializers,Wmissing-parameter-type, + Wold-style-declaration,Woverride-init): Use EnabledBy. + * c-opts.c (c_common_post_options): Do not set here explicitly. + 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 53063 diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 7d8ee6b..8470de1 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -912,24 +912,10 @@ c_common_post_options (const char **pfilename) /* -Wextra implies the following flags unless explicitly overridden. */ - if (warn_type_limits == -1) - warn_type_limits = extra_warnings; - if (warn_clobbered == -1) - warn_clobbered = extra_warnings; - if (warn_empty_body == -1) - warn_empty_body = extra_warnings; + + /* Wsign-compare is also enabled by -Wall in C++. */ if (warn_sign_compare == -1) warn_sign_compare = extra_warnings; - if (warn_missing_field_initializers == -1) - warn_missing_field_initializers = extra_warnings; - if (warn_missing_parameter_type == -1) - warn_missing_parameter_type = extra_warnings; - if (warn_old_style_declaration == -1) - warn_old_style_declaration = extra_warnings; - if (warn_override_init == -1) - warn_override_init = extra_warnings; - if (warn_ignored_qualifiers == -1) - warn_ignored_qualifiers = extra_warnings; /* -Wpointer-sign is disabled by default, but it is enabled if any of -Wall or -Wpedantic are given. */ diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index e0c166c..8afde8a 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -304,7 +304,7 @@ C ObjC C++ ObjC++ Var(warn_char_subscripts) Warning Warn about subscripts whose type is \"char\" Wclobbered -C ObjC C++ ObjC++ Var(warn_clobbered) Init(-1) Warning +C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra) Warn about variables that might be changed by \"longjmp\" or \"vfork\" Wcomment @@ -352,7 +352,7 @@ C++ ObjC++ Var(warn_ecpp) Warning Warn about violations of Effective C++ style rules Wempty-body -C ObjC C++ ObjC++ Var(warn_empty_body) Init(-1) Warning +C ObjC C++ ObjC++ Var(warn_empty_body) Warning EnabledBy(Wextra) Warn about an empty body in an if or else statement Wendif-labels @@ -407,7 +407,7 @@ Wformat= C ObjC C++ ObjC++ Joined Warning Wignored-qualifiers -C C++ Var(warn_ignored_qualifiers) Init(-1) Warning +C C++ Var(warn_ignored_qualifiers) Warning EnabledBy(Wextra) Warn whenever type qualifiers are ignored. Winit-self @@ -474,7 +474,7 @@ C ObjC C++ ObjC++ Var(warn_missing_declarations) Warning Warn about global functions without previous declarations Wmissing-field-initializers -C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Init(-1) Warning +C ObjC C++ ObjC++ Var(warn_missing_field_initializers) Warning EnabledBy(Wextra) Warn about missing fields in struct initializers Wsuggest-attribute=format @@ -490,7 +490,7 @@ C ObjC C++ ObjC++ Warning Warn about user-specified include directories that do not exist Wmissing-parameter-type -C ObjC Var(warn_missing_parameter_type) Init(-1) Warning +C ObjC Var(warn_missing_parameter_type) Warning EnabledBy(Wextra) Warn about function parameters declared without a type specifier in K&R-style functions Wmissing-prototypes @@ -538,7 +538,7 @@ C++ ObjC++ Var(warn_old_style_cast) Warning Warn if a C-style cast is used in a program Wold-style-declaration -C ObjC Var(warn_old_style_declaration) Init(-1) Warning +C ObjC Var(warn_old_style_declaration) Warning EnabledBy(Wextra) Warn for obsolescent usage in a declaration Wold-style-definition @@ -554,7 +554,7 @@ C++ ObjC++ Var(warn_overloaded_virtual) Warning Warn about overloaded virtual function names Woverride-init -C ObjC Var(warn_override_init) Init(-1) Warning +C ObjC Var(warn_override_init) Warning EnabledBy(Wextra) Warn about overriding initializers without side effects Wpacked-bitfield-compat |