aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-09-02 12:43:19 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-09-02 12:43:19 +0100
commit2d2bd949ea0425891c8504b44965cbb4b6ccce5f (patch)
treeb73424a97ff306c8f1ae185b160c05e86be29bc0 /gcc/c-family
parent5de8299cec99d5a056149ce23d09d3db5cbf0116 (diff)
downloadgcc-2d2bd949ea0425891c8504b44965cbb4b6ccce5f.zip
gcc-2d2bd949ea0425891c8504b44965cbb4b6ccce5f.tar.gz
gcc-2d2bd949ea0425891c8504b44965cbb4b6ccce5f.tar.bz2
opts.h (struct cl_option): Add warn_message field.
* opts.h (struct cl_option): Add warn_message field. (struct cl_decoded_option): Add warn_message field. * doc/options.texi (Ignore, Warn): Document. * opt-functions.awk (needs_state_p): Don't consider aliases or ignored options to need state saved. * optc-gen.awk: Handle Warn and Ignore. * opth-gen.awk: Output OPT_SPECIAL_ignore. * opts-common.c (decode_cmdline_option): Set warn_message field. Handle ignored options. (decode_cmdline_options_to_array, generate_option, generate_option_input_file): Set warn_message field. (read_cmdline_option): Generate warnings from warn_message field. Handle ignored options. * common.opt (Wunreachable-code, fargument-alias, fargument-noalias, fargument-noalias-global, fargument-noalias-anything, fcse-skip-blocks, fforce-addr, floop-optimize, frerun-loop-opt, fsched2-use-traces, fsee, fstrength-reduce, ftree-store-ccp, ftree-store-copy-prop, ftree-salias): Mark Ignore. * config/i386/i386.h (CC1_CPU_SPEC_1): Don't handle -mcpu, -mintel-syntax and -mno-intel-syntax here. * config/i386/i386.opt (mcpu=, mintel-syntax): Define as aliases using Warn. * opts.c (common_handle_option): Don't handle options marked as ignored. (enable_warning_as_error): Handle ignored options. c-family: * c.opt (Wimport, fall-virtual, falt-external-templates, fdefault-inline, fenum-int-equiv, fexternal-templates, fguiding-decls, fhonor-std, fhuge-objects, flabels-ok, fname-mangling-version-, fnew-abi, fnonnull-objects, foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable, fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as applicable. (fhandle-exceptions): Mark with Alias and Warn. * c-opts.c (c_common_handle_option): Don't handle options marked as ignored. po: * exgettext: Handle {} in operand of MissingArgError. Handle Warn. From-SVN: r163771
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog13
-rw-r--r--gcc/c-family/c-opts.c36
-rw-r--r--gcc/c-family/c.opt42
3 files changed, 34 insertions, 57 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index dac0bf4..56fef0b 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,18 @@
2010-09-02 Joseph Myers <joseph@codesourcery.com>
+ * c.opt (Wimport, fall-virtual, falt-external-templates,
+ fdefault-inline, fenum-int-equiv, fexternal-templates,
+ fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
+ fname-mangling-version-, fnew-abi, fnonnull-objects,
+ foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
+ fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
+ applicable.
+ (fhandle-exceptions): Mark with Alias and Warn.
+ * c-opts.c (c_common_handle_option): Don't handle options marked
+ as ignored.
+
+2010-09-02 Joseph Myers <joseph@codesourcery.com>
+
* c.opt (Wcomments, Werror-implicit-function-declaration,
ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index d9b212c..e641ad0 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -537,10 +537,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
value, c_family_lang_mask, kind, handlers);
break;
- case OPT_Wimport:
- /* Silently ignore for now. */
- break;
-
case OPT_Winvalid_pch:
cpp_opts->warn_invalid_pch = value;
break;
@@ -623,25 +619,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
flag_cond_mismatch = value;
break;
}
- /* Fall through. */
-
- case OPT_fall_virtual:
- case OPT_falt_external_templates:
- case OPT_fenum_int_equiv:
- case OPT_fexternal_templates:
- case OPT_fguiding_decls:
- case OPT_fhonor_std:
- case OPT_fhuge_objects:
- case OPT_flabels_ok:
- case OPT_fname_mangling_version_:
- case OPT_fnew_abi:
- case OPT_fnonnull_objects:
- case OPT_fsquangle:
- case OPT_fstrict_prototype:
- case OPT_fthis_is_variable:
- case OPT_fvtable_thunks:
- case OPT_fxref:
- case OPT_fvtable_gc:
warning (0, "switch %qs is no longer supported", option->opt_text);
break;
@@ -672,10 +649,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
constant_string_class_name = arg;
break;
- case OPT_fdefault_inline:
- /* Ignore. */
- break;
-
case OPT_fextended_identifiers:
cpp_opts->extended_identifiers = value;
break;
@@ -684,11 +657,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
flag_next_runtime = !value;
break;
- case OPT_fhandle_exceptions:
- warning (0, "-fhandle-exceptions has been renamed -fexceptions (and is now on by default)");
- flag_exceptions = value;
- break;
-
case OPT_fnext_runtime:
flag_next_runtime = value;
break;
@@ -697,10 +665,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
cpp_opts->operator_names = value;
break;
- case OPT_foptional_diags:
- /* Ignore. */
- break;
-
case OPT_fpch_deps:
cpp_opts->restore_pch_deps = value;
break;
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 5cba0de..f10cc48 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -275,7 +275,7 @@ C ObjC Var(warn_implicit_int) Init(-1) Warning
Warn when a declaration does not specify a type
Wimport
-C ObjC C++ ObjC++ Undocumented
+C ObjC C++ ObjC++ Undocumented Ignore
Wint-to-pointer-cast
C ObjC C++ ObjC++ Var(warn_int_to_pointer_cast) Init(1) Warning
@@ -534,10 +534,10 @@ C++ ObjC++ Var(flag_access_control) Init(1)
Enforce class member access control semantics
fall-virtual
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
falt-external-templates
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Change when template instances are emitted
fasm
@@ -572,7 +572,7 @@ C++ ObjC++ Var(flag_deduce_init_list) Init(1)
-fno-deduce-init-list disable deduction of std::initializer_list for a template type parameter from a brace-enclosed initializer-list
fdefault-inline
-C++ ObjC++
+C++ ObjC++ Ignore
Does nothing. Preserved for backward compatibility.
fdirectives-only
@@ -591,7 +591,7 @@ C++ ObjC++ Var(flag_enforce_eh_specs) Init(1)
Generate code to check exception specifications
fenum-int-equiv
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fexec-charset=
C ObjC C++ ObjC++ Joined RejectNegative
@@ -607,7 +607,7 @@ C ObjC C++ ObjC++ Joined RejectNegative
fexternal-templates
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
ffor-scope
C++ ObjC++ Var(flag_new_for_scope) Init(1)
@@ -630,20 +630,20 @@ C ObjC Var(flag_gnu89_inline) Init(-1)
Use traditional GNU semantics for inline functions
fguiding-decls
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fhandle-exceptions
-C++ ObjC++ Optimization
+C++ ObjC++ Optimization Alias(fexceptions) Warn({-fhandle-exceptions has been renamed -fexceptions (and is now on by default)})
fhonor-std
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fhosted
C ObjC
Assume normal C execution environment
fhuge-objects
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Enable support for huge objects
fimplement-inlines
@@ -663,7 +663,7 @@ C++ ObjC++ Var(flag_friend_injection)
Inject friend functions into enclosing namespace
flabels-ok
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
flax-vector-conversions
C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
@@ -674,10 +674,10 @@ C ObjC C++ ObjC++ Var(flag_ms_extensions)
Don't warn about uses of Microsoft extensions
fname-mangling-version-
-C++ ObjC++ Joined
+C++ ObjC++ Joined Ignore Warn(switch %qs is no longer supported)
fnew-abi
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fnext-runtime
ObjC ObjC++
@@ -691,7 +691,7 @@ fnonansi-builtins
C++ ObjC++ Var(flag_no_nonansi_builtin, 0)
fnonnull-objects
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fnothrow-opt
C++ ObjC++ Optimization Var(flag_nothrow_opt)
@@ -731,7 +731,7 @@ C++ ObjC++
Recognize C++ keywords like \"compl\" and \"xor\"
foptional-diags
-C++ ObjC++
+C++ ObjC++ Ignore
Does nothing. Preserved for backward compatibility.
fpch-deps
@@ -786,7 +786,7 @@ C ObjC C++ ObjC++ LTO Var(flag_signed_char)
Make \"char\" signed by default
fsquangle
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fstats
C++ ObjC++ Var(flag_detailed_statistics)
@@ -797,7 +797,7 @@ C++ ObjC++ Optimization Var(flag_strict_enums)
Assume that values of enumeration type are always within the minimum range of that type
fstrict-prototype
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
ftabstop=
C ObjC C++ ObjC++ Joined RejectNegative UInteger
@@ -811,7 +811,7 @@ C++ ObjC++ Joined RejectNegative UInteger
-ftemplate-depth=<number> Specify maximum template instantiation depth
fthis-is-variable
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
fthreadsafe-statics
C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
@@ -842,11 +842,11 @@ C++ ObjC++ Var(flag_visibility_ms_compat)
Changes visibility to match Microsoft Visual Studio by default
fvtable-gc
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Discard unused virtual functions
fvtable-thunks
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Implement vtables using thunks
fweak
@@ -862,7 +862,7 @@ C ObjC C++ ObjC++ Var(flag_working_directory) Init(-1)
Generate a #line directive pointing at the current working directory
fxref
-C++ ObjC++
+C++ ObjC++ Ignore Warn(switch %qs is no longer supported)
Emit cross referencing information
fzero-link