summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-03-11 14:58:44 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-03-11 13:58:44 +0000
commita3f9f006a8e24bfc2a045b918a4f3665407f0018 (patch)
tree0681cfed14dcbfd9b59a61ace8c6b34b885c20fd /gcc/toplev.c
parent355d4eb36aeb970743537e2f9b98d4c53c9e0eab (diff)
Wrap option names in gcc internal messages with %< and %>.
2019-03-11 Martin Liska <mliska@suse.cz> * check-internal-format-escaping.py: New file. 2019-03-11 Martin Liska <mliska@suse.cz> * builtins.c (expand_builtin_thread_pointer): Wrap an option name in a string format message and fix GNU coding style. (expand_builtin_set_thread_pointer): Likewise. * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): Likewise. * common/config/alpha/alpha-common.c (alpha_handle_option): Likewise. * common/config/arc/arc-common.c (arc_handle_option): Likewise. * common/config/arm/arm-common.c (arm_parse_fpu_option): Likewise. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/i386/i386-common.c (ix86_handle_option): Likewise. * common/config/ia64/ia64-common.c (ia64_handle_option): Likewise. * common/config/m68k/m68k-common.c (m68k_handle_option): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * common/config/nds32/nds32-common.c (nds32_handle_option): Likewise. * common/config/powerpcspe/powerpcspe-common.c (rs6000_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::parse): Likewise. * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. * config/aarch64/aarch64.c (aarch64_parse_one_option_token): Likewise. (aarch64_override_options_internal): Likewise. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Likewise. * config/alpha/alpha.c (alpha_option_override): Likewise. * config/arc/arc.c (arc_init): Likewise. (parse_mrgf_banked_regs_option): Likewise. (arc_override_options): Likewise. (arc_expand_builtin_aligned): Likewise. * config/arm/arm-builtins.c (arm_expand_neon_builtin): Likewise. (arm_expand_builtin): Likewise. * config/arm/arm.c (arm_option_check_internal): Likewise. (arm_configure_build_target): Likewise. (arm_option_override): Likewise. (arm_options_perform_arch_sanity_checks): Likewise. (arm_handle_cmse_nonsecure_entry): Likewise. (arm_handle_cmse_nonsecure_call): Likewise. (arm_tls_referenced_p): Likewise. (thumb1_expand_prologue): Likewise. * config/avr/avr.c (avr_option_override): Likewise. * config/bfin/bfin.c (bfin_option_override): Likewise. * config/c6x/c6x.c (c6x_option_override): Likewise. * config/cr16/cr16.c (cr16_override_options): Likewise. * config/cris/cris.c (cris_option_override): Likewise. * config/csky/csky.c (csky_handle_isr_attribute): Likewise. * config/darwin-c.c (macosx_version_as_macro): Likewise. * config/darwin.c (darwin_override_options): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/h8300/h8300.c (h8300_option_override): Likewise. * config/i386/i386.c (parse_mtune_ctrl_str): Likewise. (ix86_option_override_internal): Likewise. (warn_once_call_ms2sysv_xlogues): Likewise. (ix86_expand_prologue): Likewise. (split_stack_prologue_scratch_regno): Likewise. (ix86_warn_parameter_passing_abi): Likewise. * config/ia64/ia64.c (fix_range): Likewise. * config/m68k/m68k.c (m68k_option_override): Likewise. * config/microblaze/microblaze.c (microblaze_option_override): Likewise. * config/mips/mips.c (mips_emit_probe_stack_range): Likewise. (mips_set_compression_mode): Likewise. * config/mmix/mmix.c (mmix_option_override): Likewise. * config/mn10300/mn10300.c (mn10300_option_override): Likewise. * config/msp430/msp430.c (msp430_option_override): Likewise. * config/nds32/nds32.c (nds32_option_override): Likewise. * config/nios2/nios2.c (nios2_custom_check_insns): Likewise. (nios2_option_override): Likewise. (nios2_expand_custom_builtin): Likewise. * config/nvptx/mkoffload.c (main): Likewise. * config/nvptx/nvptx.c (diagnose_openacc_conflict): Likewise. * config/pa/pa.c (fix_range): Likewise. (pa_option_override): Likewise. * config/riscv/riscv.c (riscv_parse_cpu): Likewise. (riscv_option_override): Likewise. * config/rl78/rl78.c (rl78_option_override): Likewise. * config/rs6000/aix61.h: Likewise. * config/rs6000/aix71.h: Likewise. * config/rs6000/aix72.h: Likewise. * config/rs6000/driver-rs6000.c (elf_platform): Likewise. * config/rs6000/freebsd64.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. (rs6000_expand_zeroop_builtin): Likewise. (rs6000_expand_mtfsb_builtin): Likewise. (rs6000_expand_set_fpscr_rn_builtin): Likewise. (rs6000_expand_set_fpscr_drn_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (rs6000_expand_split_stack_prologue): Likewise. * config/rs6000/rtems.h: Likewise. * config/rx/rx.c (valid_psw_flag): Likewise. (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. (s390_function_profiler): Likewise. (s390_option_override_internal): Likewise. (s390_option_override): Likewise. * config/sh/sh.c (sh_option_override): Likewise. (sh_builtin_saveregs): Likewise. (sh_fix_range): Likewise. * config/sh/vxworks.h: Likewise. * config/sparc/sparc.c (sparc_option_override): Likewise. * config/spu/spu.c (spu_option_override): Likewise. (fix_range): Likewise. * config/visium/visium.c (visium_option_override): Likewise. (visium_handle_interrupt_attr): Likewise. * config/xtensa/xtensa.c (xtensa_option_override): Likewise. * dbgcnt.c (dbg_cnt_set_limit_by_name): Likewise. (dbg_cnt_process_opt): Likewise. * dwarf2out.c (output_dwarf_version): Likewise. * except.c (expand_eh_return): Likewise. * gcc.c (defined): Likewise. (driver_handle_option): Likewise. (process_command): Likewise. (compare_files): Likewise. (driver::prepare_infiles): Likewise. (driver::do_spec_on_infiles): Likewise. (driver::maybe_run_linker): Likewise. * omp-offload.c (oacc_parse_default_dims): Likewise. * opts-global.c (handle_common_deferred_options): Likewise. * opts.c (parse_sanitizer_options): Likewise. (common_handle_option): Likewise. (enable_warning_as_error): Likewise. * passes.c (enable_disable_pass): Likewise. * plugin.c (parse_plugin_arg_opt): Likewise. (default_plugin_dir_name): Likewise. * targhooks.c (default_expand_builtin_saveregs): Likewise. (default_pch_valid_p): Likewise. * toplev.c (init_asm_output): Likewise. (process_options): Likewise. (toplev::run_self_tests): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-inline.c (inline_forbidden_p_stmt): Likewise. (tree_inlinable_function_p): Likewise. * var-tracking.c (vt_find_locations): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * gcc-interface/misc.c (gnat_post_options) Wrap an option name in a string format message and fix GNU coding style.: 2019-03-11 Martin Liska <mliska@suse.cz> * c-attribs.c (handle_nocf_check_attribute): Wrap an option name in a string format message and fix GNU coding style. * c-common.c (vector_types_convertible_p): Likewise. (c_build_vec_perm_expr): Likewise. * c-indentation.c (get_visual_column): Likewise. * c-opts.c (c_common_handle_option): Likewise. (c_common_post_options): Likewise. (sanitize_cpp_opts): Likewise. * c-pch.c (c_common_pch_pragma): Likewise. * c-pragma.c (handle_pragma_pack): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * c-decl.c (check_for_loop_decls): Wrap an option name in a string format message and fix GNU coding style. * c-parser.c (c_parser_declspecs): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * call.c (convert_arg_to_ellipsis): Wrap an option name in a string format message and fix GNU coding style. (build_over_call): Likewise. * class.c (check_field_decl): Likewise. (layout_nonempty_base_or_field): Likewise. * constexpr.c (cxx_eval_loop_expr): Likewise. * cvt.c (type_promotes_to): Likewise. * decl.c (cxx_init_decl_processing): Likewise. (mark_inline_variable): Likewise. (grokdeclarator): Likewise. * decl2.c (record_mangling): Likewise. * error.c (maybe_warn_cpp0x): Likewise. * except.c (doing_eh): Likewise. * mangle.c (maybe_check_abi_tags): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_userdef_numeric_literal): Likewise. (cp_parser_primary_expression): Likewise. (cp_parser_unqualified_id): Likewise. (cp_parser_pseudo_destructor_name): Likewise. (cp_parser_builtin_offsetof): Likewise. (cp_parser_lambda_expression): Likewise. (cp_parser_lambda_introducer): Likewise. (cp_parser_lambda_declarator_opt): Likewise. (cp_parser_selection_statement): Likewise. (cp_parser_init_statement): Likewise. (cp_parser_decomposition_declaration): Likewise. (cp_parser_function_specifier_opt): Likewise. (cp_parser_static_assert): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_namespace_definition): Likewise. (cp_parser_using_declaration): Likewise. (cp_parser_ctor_initializer_opt_and_function_body): Likewise. (cp_parser_initializer_list): Likewise. (cp_parser_type_parameter_key): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_try_block): Likewise. (cp_parser_std_attribute_spec): Likewise. (cp_parser_requires_clause_opt): Likewise. * pt.c (check_template_variable): Likewise. (check_default_tmpl_args): Likewise. (push_tinst_level_loc): Likewise. (instantiate_pending_templates): Likewise. (invalid_nontype_parm_type_p): Likewise. * repo.c (get_base_filename): Likewise. * rtti.c (typeid_ok_p): Likewise. (build_dynamic_cast_1): Likewise. * tree.c (maybe_warn_parm_abi): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * decl.c (match_record_decl): Wrap an option name in a string format message and fix GNU coding style. (gfc_match_pointer): Likewise. * expr.c (find_array_section): Likewise. * intrinsic.c (gfc_is_intrinsic): Likewise. * options.c (gfc_post_options): Likewise. * primary.c (match_integer_constant): Likewise. * trans-common.c (translate_common): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * lto-lang.c (lto_post_options): Wrap an option name in a string format message and fix GNU coding style. * lto-symtab.c (lto_symtab_merge_decls_2): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * g++.dg/conversion/simd3.C (foo): Wrap option names with apostrophe character. * g++.dg/cpp1z/decomp3.C (test): Likewise. (test3): Likewise. * g++.dg/cpp1z/decomp4.C (test): Likewise. * g++.dg/cpp1z/decomp44.C (foo): Likewise. * g++.dg/cpp1z/decomp45.C (f): Likewise. * g++.dg/opt/pr34036.C: Likewise. * g++.dg/spellcheck-c++-11-keyword.C: Likewise. * gcc.dg/c90-fordecl-1.c (foo): Likewise. * gcc.dg/cpp/dir-only-4.c: Likewise. * gcc.dg/cpp/dir-only-5.c: Likewise. * gcc.dg/cpp/pr71591.c: Likewise. * gcc.dg/format/opt-1.c: Likewise. * gcc.dg/format/opt-2.c: Likewise. * gcc.dg/format/opt-3.c: Likewise. * gcc.dg/format/opt-4.c: Likewise. * gcc.dg/format/opt-5.c: Likewise. * gcc.dg/format/opt-6.c: Likewise. * gcc.dg/pr22231.c: Likewise. * gcc.dg/pr33007.c: Likewise. * gcc.dg/simd-1.c (hanneke): Likewise. * gcc.dg/simd-5.c: Likewise. * gcc.dg/simd-6.c: Likewise. * gcc.dg/spellcheck-options-14.c: Likewise. * gcc.dg/spellcheck-options-15.c: Likewise. * gcc.dg/spellcheck-options-16.c: Likewise. * gcc.dg/spellcheck-options-17.c: Likewise. * gcc.dg/tree-ssa/pr23109.c: Likewise. * gcc.dg/tree-ssa/recip-5.c: Likewise. * gcc.target/i386/cet-notrack-1a.c (func): Likewise. (__attribute__): Likewise. * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. * gcc.target/powerpc/warn-1.c: Likewise. * gcc.target/powerpc/warn-2.c: Likewise. From-SVN: r269586
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index d3719fff443..397a164068d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -901,7 +901,7 @@ init_asm_output (const char *name)
}
else
inform (UNKNOWN_LOCATION,
- "-frecord-gcc-switches is not supported by "
+ "%<-frecord-gcc-switches%> is not supported by "
"the current target");
}
@@ -1367,8 +1367,8 @@ process_options (void)
|| flag_graphite_identity
|| flag_loop_parallelize_all)
sorry ("Graphite loop optimizations cannot be used (isl is not available) "
- "(-fgraphite, -fgraphite-identity, -floop-nest-optimize, "
- "-floop-parallelize-all)");
+ "(%<-fgraphite%>, %<-fgraphite-identity%>, "
+ "%<-floop-nest-optimize%>, %<-floop-parallelize-all%>)");
#endif
if (flag_cf_protection != CF_NONE
@@ -1452,7 +1452,7 @@ process_options (void)
}
else
warning_at (UNKNOWN_LOCATION, 0,
- "-f%sleading-underscore not supported on this "
+ "%<-f%sleading-underscore%> not supported on this "
"target machine", flag_leading_underscore ? "" : "no-");
}
@@ -1619,8 +1619,9 @@ process_options (void)
else if (debug_variable_location_views == -1 && dwarf_version != 5)
{
warning_at (UNKNOWN_LOCATION, 0,
- "without -gdwarf-5, -gvariable-location-views=incompat5 "
- "is equivalent to -gvariable-location-views");
+ "without %<-gdwarf-5%>, "
+ "%<-gvariable-location-views=incompat5%> "
+ "is equivalent to %<-gvariable-location-views%>");
debug_variable_location_views = 1;
}
@@ -1634,8 +1635,8 @@ process_options (void)
&& !debug_variable_location_views)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-ginternal-reset-location-views is forced disabled "
- "without -gvariable-location-views");
+ "%<-ginternal-reset-location-views%> is forced disabled "
+ "without %<-gvariable-location-views%>");
debug_internal_reset_location_views = 0;
}
@@ -1644,8 +1645,8 @@ process_options (void)
else if (debug_inline_points && !debug_nonbind_markers_p)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-ginline-points is forced disabled without "
- "-gstatement-frontiers");
+ "%<-ginline-points%> is forced disabled without "
+ "%<-gstatement-frontiers%>");
debug_inline_points = 0;
}
@@ -1673,13 +1674,13 @@ process_options (void)
if (flag_function_sections)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-ffunction-sections not supported for this target");
+ "%<-ffunction-sections%> not supported for this target");
flag_function_sections = 0;
}
if (flag_data_sections)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fdata-sections not supported for this target");
+ "%<-fdata-sections%> not supported for this target");
flag_data_sections = 0;
}
}
@@ -1687,14 +1688,14 @@ process_options (void)
if (flag_prefetch_loop_arrays > 0 && !targetm.code_for_prefetch)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fprefetch-loop-arrays not supported for this target");
+ "%<-fprefetch-loop-arrays%> not supported for this target");
flag_prefetch_loop_arrays = 0;
}
else if (flag_prefetch_loop_arrays > 0 && !targetm.have_prefetch ())
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fprefetch-loop-arrays not supported for this target "
- "(try -march switches)");
+ "%<-fprefetch-loop-arrays%> not supported for this target "
+ "(try %<-march%> switches)");
flag_prefetch_loop_arrays = 0;
}
@@ -1703,7 +1704,7 @@ process_options (void)
if (flag_prefetch_loop_arrays > 0 && optimize_size)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fprefetch-loop-arrays is not supported with -Os");
+ "%<-fprefetch-loop-arrays%> is not supported with %<-Os%>");
flag_prefetch_loop_arrays = 0;
}
@@ -1715,7 +1716,7 @@ process_options (void)
if (flag_associative_math && (flag_trapping_math || flag_signed_zeros))
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fassociative-math disabled; other options take "
+ "%<-fassociative-math%> disabled; other options take "
"precedence");
flag_associative_math = 0;
}
@@ -1753,7 +1754,7 @@ process_options (void)
if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fstack-protector not supported for this target");
+ "%<-fstack-protector%> not supported for this target");
flag_stack_protect = 0;
}
if (!flag_stack_protect)
@@ -1765,7 +1766,7 @@ process_options (void)
&& !FRAME_GROWS_DOWNWARD)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fsanitize=address and -fsanitize=kernel-address "
+ "%<-fsanitize=address%> and %<-fsanitize=kernel-address%> "
"are not supported for this target");
flag_sanitize &= ~SANITIZE_ADDRESS;
}
@@ -1774,7 +1775,7 @@ process_options (void)
&& targetm.asan_shadow_offset == NULL)
{
warning_at (UNKNOWN_LOCATION, 0,
- "-fsanitize=address not supported for this target");
+ "%<-fsanitize=address%> not supported for this target");
flag_sanitize &= ~SANITIZE_ADDRESS;
}
@@ -2255,7 +2256,7 @@ toplev::run_self_tests ()
{
if (no_backend)
{
- error_at (UNKNOWN_LOCATION, "self-tests incompatible with -E");
+ error_at (UNKNOWN_LOCATION, "self-tests incompatible with %<-E%>");
return;
}
#if CHECKING_P