From a3f9f006a8e24bfc2a045b918a4f3665407f0018 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Mar 2019 14:58:44 +0100 Subject: Wrap option names in gcc internal messages with %< and %>. 2019-03-11 Martin Liska * check-internal-format-escaping.py: New file. 2019-03-11 Martin Liska * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 --- contrib/ChangeLog | 4 + contrib/check-internal-format-escaping.py | 64 ++++++++++ gcc/ChangeLog | 137 ++++++++++++++++++++++ gcc/ada/ChangeLog | 5 + gcc/ada/gcc-interface/misc.c | 2 +- gcc/builtins.c | 4 +- gcc/c-family/ChangeLog | 13 ++ gcc/c-family/c-attribs.c | 3 +- gcc/c-family/c-common.c | 12 +- gcc/c-family/c-indentation.c | 2 +- gcc/c-family/c-opts.c | 35 +++--- gcc/c-family/c-pch.c | 5 +- gcc/c-family/c-pragma.c | 2 +- gcc/c/ChangeLog | 6 + gcc/c/c-decl.c | 4 +- gcc/c/c-parser.c | 2 +- gcc/common/config/aarch64/aarch64-common.c | 2 +- gcc/common/config/alpha/alpha-common.c | 2 +- gcc/common/config/arc/arc-common.c | 2 +- gcc/common/config/arm/arm-common.c | 2 +- gcc/common/config/bfin/bfin-common.c | 7 +- gcc/common/config/i386/i386-common.c | 17 +-- gcc/common/config/ia64/ia64-common.c | 2 +- gcc/common/config/m68k/m68k-common.c | 2 +- gcc/common/config/msp430/msp430-common.c | 2 +- gcc/common/config/nds32/nds32-common.c | 9 +- gcc/common/config/powerpcspe/powerpcspe-common.c | 8 +- gcc/common/config/riscv/riscv-common.c | 20 ++-- gcc/common/config/rs6000/rs6000-common.c | 4 +- gcc/config/aarch64/aarch64.c | 28 ++--- gcc/config/alpha/alpha.c | 17 +-- gcc/config/arc/arc.c | 18 +-- gcc/config/arm/arm-builtins.c | 5 +- gcc/config/arm/arm.c | 42 ++++--- gcc/config/avr/avr.c | 8 +- gcc/config/bfin/bfin.c | 19 +-- gcc/config/c6x/c6x.c | 3 +- gcc/config/cr16/cr16.c | 3 +- gcc/config/cris/cris.c | 12 +- gcc/config/csky/csky.c | 2 +- gcc/config/darwin-c.c | 2 +- gcc/config/darwin.c | 6 +- gcc/config/frv/frv.c | 2 +- gcc/config/h8300/h8300.c | 18 +-- gcc/config/i386/i386.c | 54 ++++----- gcc/config/ia64/ia64.c | 2 +- gcc/config/m68k/m68k.c | 12 +- gcc/config/microblaze/microblaze.c | 15 ++- gcc/config/mips/mips.c | 4 +- gcc/config/mmix/mmix.c | 3 +- gcc/config/mn10300/mn10300.c | 2 +- gcc/config/msp430/msp430.c | 31 +++-- gcc/config/nds32/nds32.c | 2 +- gcc/config/nios2/nios2.c | 25 ++-- gcc/config/nvptx/mkoffload.c | 3 +- gcc/config/nvptx/nvptx.c | 2 +- gcc/config/pa/pa.c | 10 +- gcc/config/riscv/riscv.c | 14 +-- gcc/config/rl78/rl78.c | 14 ++- gcc/config/rs6000/aix61.h | 6 +- gcc/config/rs6000/aix71.h | 6 +- gcc/config/rs6000/aix72.h | 6 +- gcc/config/rs6000/driver-rs6000.c | 3 +- gcc/config/rs6000/freebsd64.h | 6 +- gcc/config/rs6000/linux64.h | 6 +- gcc/config/rs6000/rs6000.c | 42 ++++--- gcc/config/rs6000/rtems.h | 4 +- gcc/config/rx/rx.c | 7 +- gcc/config/s390/s390-c.c | 2 +- gcc/config/s390/s390.c | 29 +++-- gcc/config/sh/sh.c | 8 +- gcc/config/sh/vxworks.h | 2 +- gcc/config/sparc/sparc.c | 8 +- gcc/config/spu/spu.c | 6 +- gcc/config/visium/visium.c | 6 +- gcc/config/xtensa/xtensa.c | 2 +- gcc/cp/ChangeLog | 50 ++++++++ gcc/cp/call.c | 5 +- gcc/cp/class.c | 7 +- gcc/cp/constexpr.c | 2 +- gcc/cp/cvt.c | 2 +- gcc/cp/decl.c | 13 +- gcc/cp/decl2.c | 2 +- gcc/cp/error.c | 32 ++--- gcc/cp/except.c | 2 +- gcc/cp/mangle.c | 8 +- gcc/cp/parser.c | 87 +++++++------- gcc/cp/pt.c | 16 +-- gcc/cp/repo.c | 2 +- gcc/cp/rtti.c | 4 +- gcc/cp/tree.c | 10 +- gcc/dbgcnt.c | 12 +- gcc/dwarf2out.c | 4 +- gcc/except.c | 2 +- gcc/fortran/ChangeLog | 11 ++ gcc/fortran/decl.c | 6 +- gcc/fortran/expr.c | 2 +- gcc/fortran/intrinsic.c | 4 +- gcc/fortran/options.c | 2 +- gcc/fortran/primary.c | 2 +- gcc/fortran/trans-common.c | 4 +- gcc/gcc.c | 21 ++-- gcc/lto/ChangeLog | 6 + gcc/lto/lto-lang.c | 5 +- gcc/lto/lto-symtab.c | 2 +- gcc/omp-offload.c | 2 +- gcc/opts-global.c | 4 +- gcc/opts.c | 20 ++-- gcc/passes.c | 8 +- gcc/plugin.c | 6 +- gcc/targhooks.c | 6 +- gcc/testsuite/ChangeLog | 39 ++++++ gcc/testsuite/g++.dg/conversion/simd3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp3.C | 42 +++---- gcc/testsuite/g++.dg/cpp1z/decomp4.C | 18 +-- gcc/testsuite/g++.dg/cpp1z/decomp44.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp45.C | 2 +- gcc/testsuite/g++.dg/opt/pr34036.C | 2 +- gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C | 8 +- gcc/testsuite/gcc.dg/c90-fordecl-1.c | 2 +- gcc/testsuite/gcc.dg/cpp/dir-only-4.c | 2 +- gcc/testsuite/gcc.dg/cpp/dir-only-5.c | 2 +- gcc/testsuite/gcc.dg/cpp/pr71591.c | 2 +- gcc/testsuite/gcc.dg/format/opt-1.c | 2 +- gcc/testsuite/gcc.dg/format/opt-2.c | 2 +- gcc/testsuite/gcc.dg/format/opt-3.c | 2 +- gcc/testsuite/gcc.dg/format/opt-4.c | 2 +- gcc/testsuite/gcc.dg/format/opt-5.c | 2 +- gcc/testsuite/gcc.dg/format/opt-6.c | 2 +- gcc/testsuite/gcc.dg/pr22231.c | 2 +- gcc/testsuite/gcc.dg/pr33007.c | 2 +- gcc/testsuite/gcc.dg/simd-1.c | 2 +- gcc/testsuite/gcc.dg/simd-5.c | 2 +- gcc/testsuite/gcc.dg/simd-6.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-14.c | 6 +- gcc/testsuite/gcc.dg/spellcheck-options-15.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-16.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-17.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr23109.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/recip-5.c | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-1a.c | 8 +- gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c | 2 +- gcc/testsuite/gcc.target/powerpc/warn-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/warn-2.c | 2 +- gcc/toplev.c | 43 +++---- gcc/tree-cfg.c | 4 +- gcc/tree-inline.c | 6 +- gcc/var-tracking.c | 2 +- 149 files changed, 951 insertions(+), 558 deletions(-) create mode 100755 contrib/check-internal-format-escaping.py diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 20d5ade..cd5a983 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2019-03-11 Martin Liska + + * check-internal-format-escaping.py: New file. + 2019-03-10 Tommy Nguyen PR contrib/82704 diff --git a/contrib/check-internal-format-escaping.py b/contrib/check-internal-format-escaping.py new file mode 100755 index 0000000..5513b76 --- /dev/null +++ b/contrib/check-internal-format-escaping.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +# +# Check gcc.pot file for gcc-internal-format and print all strings +# that contain an option that is not wrapped by %<-option_name%>. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 3, or (at your option) any later +# version. +# +# GCC is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . */ +# +# +# + +import argparse +import re + +parser = argparse.ArgumentParser(description='') +parser.add_argument('file', help = 'pot file') + +args = parser.parse_args() + +origin = None +internal = False + +lines = open(args.file).readlines() +for i, l in enumerate(lines): + l = l.strip() + s = 'msgid ' + if l.startswith('#: '): + origin = l + elif '#, gcc-internal-format' in l: + internal = True + if l.startswith(s) and origin and internal: + j = 0 + while not lines[i + j].startswith('msgstr'): + l = lines[i + j] + if l.startswith(s): + l = l[len(s):] + text = l.strip('"').strip() + if text: + parts = text.split(' ') + for p in parts: + if p.startswith('-'): + if len(p) >= 2 and (p[1].isalpha() and p != '-INF'): + print('%s: %s' % (origin, text)) + elif p.startswith('__builtin_'): + print('%s: %s' % (origin, text)) +# if re.search("[a-zA-Z]'[a-zA-Z]", p): +# print('%s: %s' % (origin, text)) + j += 1 + + origin = None + internal = False diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83f5a83..dd07096 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,140 @@ +2019-03-11 Martin Liska + + * 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 Andreas Krebbel * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9003bec..1863f5b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Martin Liska + + * gcc-interface/misc.c (gnat_post_options) Wrap an option name + in a string format message and fix GNU coding style.: + 2019-02-08 Eric Botcazou * gcc-interface/trans.c (gnat_to_gnu) : Minor tweak. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 38e33be..5737165 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -256,7 +256,7 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) { /* Excess precision other than "fast" requires front-end support. */ if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for Ada"); + sorry ("%<-fexcess-precision=standard%> for Ada"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; /* No psABI change warnings for Ada. */ diff --git a/gcc/builtins.c b/gcc/builtins.c index 0910c72..a65eb88 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -6889,7 +6889,7 @@ expand_builtin_thread_pointer (tree exp, rtx target) expand_insn (icode, 1, &op); return target; } - error ("__builtin_thread_pointer is not supported on this target"); + error ("%<__builtin_thread_pointer%> is not supported on this target"); return const0_rtx; } @@ -6909,7 +6909,7 @@ expand_builtin_set_thread_pointer (tree exp) expand_insn (icode, 1, &op); return; } - error ("__builtin_set_thread_pointer is not supported on this target"); + error ("%<__builtin_set_thread_pointer%> is not supported on this target"); } diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 55006e6..e529538 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,16 @@ +2019-03-11 Martin Liska + + * 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-08 Jakub Jelinek PR tree-optimization/89550 diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 2058459..e559d3b 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -1072,7 +1072,8 @@ handle_nocf_check_attribute (tree *node, tree name, else if (!(flag_cf_protection & CF_BRANCH)) { warning (OPT_Wattributes, "%qE attribute ignored. Use " - "-fcf-protection option to enable it", name); + "%<-fcf-protection%> option to enable it", + name); *no_add_attrs = true; } diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index e5a19cc..019f108 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -976,7 +976,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note) if (emit_lax_note && !emitted_lax_note) { emitted_lax_note = true; - inform (input_location, "use -flax-vector-conversions to permit " + inform (input_location, "use %<-flax-vector-conversions%> to permit " "conversions between vectors with differing " "element types or numbers of subparts"); } @@ -1016,7 +1016,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, if (!VECTOR_INTEGER_TYPE_P (TREE_TYPE (mask))) { if (complain) - error_at (loc, "__builtin_shuffle last argument must " + error_at (loc, "%<__builtin_shuffle%> last argument must " "be an integer vector"); return error_mark_node; } @@ -1025,14 +1025,14 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, || !VECTOR_TYPE_P (TREE_TYPE (v1))) { if (complain) - error_at (loc, "__builtin_shuffle arguments must be vectors"); + error_at (loc, "%<__builtin_shuffle%> arguments must be vectors"); return error_mark_node; } if (TYPE_MAIN_VARIANT (TREE_TYPE (v0)) != TYPE_MAIN_VARIANT (TREE_TYPE (v1))) { if (complain) - error_at (loc, "__builtin_shuffle argument vectors must be of " + error_at (loc, "%<__builtin_shuffle%> argument vectors must be of " "the same type"); return error_mark_node; } @@ -1043,7 +1043,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, TYPE_VECTOR_SUBPARTS (TREE_TYPE (mask)))) { if (complain) - error_at (loc, "__builtin_shuffle number of elements of the " + error_at (loc, "%<__builtin_shuffle%> number of elements of the " "argument vector(s) and the mask vector should " "be the same"); return error_mark_node; @@ -1053,7 +1053,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, != GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (TREE_TYPE (mask))))) { if (complain) - error_at (loc, "__builtin_shuffle argument vector(s) inner type " + error_at (loc, "%<__builtin_shuffle%> argument vector(s) inner type " "must have the same size as inner type of the mask"); return error_mark_node; } diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c index 23eac79..e643125 100644 --- a/gcc/c-family/c-indentation.c +++ b/gcc/c-family/c-indentation.c @@ -64,7 +64,7 @@ get_visual_column (expanded_location exploc, location_t loc, /* Notify the user the first time this happens. */ issued_note = true; inform (loc, - "-Wmisleading-indentation is disabled from this point" + "%<-Wmisleading-indentation%> is disabled from this point" " onwards, since column-tracking was disabled due to" " the size of the code/headers"); } diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 9660f51..3233fdb 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -327,7 +327,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, error ("-I- specified twice"); quote_chain_split = true; split_quote_chain (); - inform (input_location, "obsolete option -I- used, please use -iquote instead"); + inform (input_location, "obsolete option %<-I-%> used, " + "please use %<-iquote%> instead"); } break; @@ -796,7 +797,7 @@ c_common_post_options (const char **pfilename) if (c_dialect_cxx ()) { if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for C++"); + sorry ("%<-fexcess-precision=standard%> for C++"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; } else if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT) @@ -831,7 +832,7 @@ c_common_post_options (const char **pfilename) if (flag_gnu89_inline == -1) flag_gnu89_inline = !flag_isoc99; else if (!flag_gnu89_inline && !flag_isoc99) - error ("-fno-gnu89-inline is only supported in GNU99 or C99 mode"); + error ("%<-fno-gnu89-inline%> is only supported in GNU99 or C99 mode"); /* Default to ObjC sjlj exception handling if NeXT runtime. */ if (flag_objc_sjlj_exceptions < 0) @@ -877,17 +878,17 @@ c_common_post_options (const char **pfilename) if (!warn_format) { warning (OPT_Wformat_y2k, - "-Wformat-y2k ignored without -Wformat"); + "%<-Wformat-y2k%> ignored without %<-Wformat%>"); warning (OPT_Wformat_extra_args, - "-Wformat-extra-args ignored without -Wformat"); + "%<-Wformat-extra-args%> ignored without %<-Wformat%>"); warning (OPT_Wformat_zero_length, - "-Wformat-zero-length ignored without -Wformat"); + "%<-Wformat-zero-length%> ignored without %<-Wformat%>"); warning (OPT_Wformat_nonliteral, - "-Wformat-nonliteral ignored without -Wformat"); + "%<-Wformat-nonliteral%> ignored without %<-Wformat%>"); warning (OPT_Wformat_contains_nul, - "-Wformat-contains-nul ignored without -Wformat"); + "%<-Wformat-contains-nul%> ignored without %<-Wformat%>"); warning (OPT_Wformat_security, - "-Wformat-security ignored without -Wformat"); + "%<-Wformat-security%> ignored without %<-Wformat%>"); } /* -Wimplicit-function-declaration is enabled by default for C99. */ @@ -944,12 +945,12 @@ c_common_post_options (const char **pfilename) if (flag_abi_version == latest_abi_version) { auto_diagnostic_group d; - if (warning (OPT_Wabi, "-Wabi won't warn about anything")) + if (warning (OPT_Wabi, "%<-Wabi%> won't warn about anything")) { - inform (input_location, "-Wabi warns about differences " + inform (input_location, "%<-Wabi%> warns about differences " "from the most up-to-date ABI, which is also used " "by default"); - inform (input_location, "use e.g. -Wabi=11 to warn about " + inform (input_location, "use e.g. %<-Wabi=11%> to warn about " "changes from GCC 7"); } flag_abi_compat_version = abi_compat_default; @@ -1304,7 +1305,8 @@ sanitize_cpp_opts (void) /* If we don't know what style of dependencies to output, complain if any other dependency switches have been given. */ if (deps_seen && cpp_opts->deps.style == DEPS_NONE) - error ("to generate dependencies you must specify either -M or -MM"); + error ("to generate dependencies you must specify either %<-M%> " + "or %<-MM%>"); /* -dM and dependencies suppress normal output; do it here so that the last -d[MDN] switch overrides earlier ones. */ @@ -1327,7 +1329,7 @@ sanitize_cpp_opts (void) flag_no_line_commands = 1; } else if (cpp_opts->deps.missing_files) - error ("-MG may only be used with -M or -MM"); + error ("%<-MG%> may only be used with %<-M%> or %<-MM%>"); cpp_opts->unsigned_char = !flag_signed_char; cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS; @@ -1360,9 +1362,10 @@ sanitize_cpp_opts (void) if (cpp_opts->directives_only) { if (cpp_warn_unused_macros) - error ("-fdirectives-only is incompatible with -Wunused_macros"); + error ("%<-fdirectives-only%> is incompatible " + "with %<-Wunused-macros%>"); if (cpp_opts->traditional) - error ("-fdirectives-only is incompatible with -traditional"); + error ("%<-fdirectives-only%> is incompatible with %<-traditional%>"); } } diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c index 5492752..316fb84f 100644 --- a/gcc/c-family/c-pch.c +++ b/gcc/c-family/c-pch.c @@ -406,7 +406,8 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name) if (!cpp_get_options (pfile)->preprocessed) { - error ("pch_preprocess pragma should only be used with -fpreprocessed"); + error ("pch_preprocess pragma should only be used " + "with %<-fpreprocessed%>"); inform (input_location, "use #include instead"); return; } @@ -418,7 +419,7 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name) if (c_common_valid_pch (pfile, name, fd) != 1) { if (!cpp_get_options (pfile)->warn_invalid_pch) - inform (input_location, "use -Winvalid-pch for more information"); + inform (input_location, "use %<-Winvalid-pch%> for more information"); fatal_error (input_location, "%s: PCH file was invalid", name); } diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index bcc3302..fbc734a 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -196,7 +196,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>"); if (flag_pack_struct) - GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored"); + GCC_BAD ("#pragma pack has no effect with %<-fpack-struct%> - ignored"); if (action != pop) switch (align) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index b59be5e..5859f5b 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Martin Liska + + * 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-08 Jakub Jelinek PR tree-optimization/89550 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 32ec183..d8fa109 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -9786,8 +9786,8 @@ check_for_loop_decls (location_t loc, bool turn_off_iso_c99_error) if (hint) { inform (loc, - "use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 " - "to compile your code"); + "use option %<-std=c99%>, %<-std=gnu99%>, %<-std=c11%> or " + "%<-std=gnu11%> to compile your code"); hint = false; } return NULL_TREE; diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index ee722cc..5134e95 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -2880,7 +2880,7 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs, break; case RID_GIMPLE: if (! flag_gimple) - error_at (loc, "%<__GIMPLE%> only valid with -fgimple"); + error_at (loc, "%<__GIMPLE%> only valid with %<-fgimple%>"); c_parser_consume_token (parser); specs->gimple_p = true; specs->locations[cdw_gimple] = loc; diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 5329471..bab3ab3 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -536,7 +536,7 @@ aarch64_rewrite_selected_cpu (const char *name) found does not map to an architecture we understand. */ if (p_to_a->arch == aarch64_no_arch || a_to_an->arch == aarch64_no_arch) - fatal_error (input_location, "unknown value %qs for -mcpu", name); + fatal_error (input_location, "unknown value %qs for %<-mcpu%>", name); unsigned long extensions = p_to_a->flags; aarch64_parse_extension (extension_str.c_str (), &extensions, NULL); diff --git a/gcc/common/config/alpha/alpha-common.c b/gcc/common/config/alpha/alpha-common.c index f7a861a..05fdf81 100644 --- a/gcc/common/config/alpha/alpha-common.c +++ b/gcc/common/config/alpha/alpha-common.c @@ -72,7 +72,7 @@ alpha_handle_option (struct gcc_options *opts, case OPT_mtls_size_: if (value != 16 && value != 32 && value != 64) - error_at (loc, "bad value %qs for -mtls-size switch", arg); + error_at (loc, "bad value %qs for %<-mtls-size%> switch", arg); break; } diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c index db39433..e10e161 100644 --- a/gcc/common/config/arc/arc-common.c +++ b/gcc/common/config/arc/arc-common.c @@ -84,7 +84,7 @@ arc_handle_option (struct gcc_options *opts, our caller, so comparing arc_cpu with PROCESSOR_NONE is pointless. */ if (mcpu_seen != PROCESSOR_NONE && mcpu_seen != value) - warning_at (loc, 0, "multiple -mcpu= options specified."); + warning_at (loc, 0, "multiple %<-mcpu=%> options specified."); mcpu_seen = value; break; diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 8c64308..41a920f 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -458,7 +458,7 @@ arm_parse_fpu_option (const char *opt) return all_fpus + i; } - error_at (input_location, "unrecognized -mfpu target: %s", opt); + error_at (input_location, "unrecognized %<-mfpu%> target: %s", opt); arm_print_hint_for_fpu_option (opt); return NULL; } diff --git a/gcc/common/config/bfin/bfin-common.c b/gcc/common/config/bfin/bfin-common.c index a85fb8f..10910f3 100644 --- a/gcc/common/config/bfin/bfin-common.c +++ b/gcc/common/config/bfin/bfin-common.c @@ -301,7 +301,7 @@ bfin_handle_option (struct gcc_options *opts, { case OPT_mshared_library_id_: if (value > MAX_LIBRARY_ID) - error_at (loc, "-mshared-library-id=%s is not between 0 and %d", + error_at (loc, "%<-mshared-library-id=%s%> is not between 0 and %d", arg, MAX_LIBRARY_ID); return true; @@ -320,7 +320,7 @@ bfin_handle_option (struct gcc_options *opts, if (p == NULL) { - error_at (loc, "-mcpu=%s is not valid", arg); + error_at (loc, "%<-mcpu=%s%> is not valid", arg); return false; } @@ -356,7 +356,8 @@ bfin_handle_option (struct gcc_options *opts, || si_major > 0xff || si_minor > 0xff) { invalid_silicon_revision: - error_at (loc, "-mcpu=%s has invalid silicon revision", arg); + error_at (loc, "%<-mcpu=%s%> has invalid silicon revision", + arg); return false; } diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index a5dac6d..ee725a4 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -1337,18 +1337,20 @@ ix86_handle_option (struct gcc_options *opts, case OPT_malign_loops_: - warning_at (loc, 0, "-malign-loops is obsolete, use -falign-loops"); + warning_at (loc, 0, "%<-malign-loops%> is obsolete, " + "use %<-falign-loops%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-loops=%d is not between 0 and %d", + error_at (loc, "%<-malign-loops=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_loops, value); return true; case OPT_malign_jumps_: - warning_at (loc, 0, "-malign-jumps is obsolete, use -falign-jumps"); + warning_at (loc, 0, "%<-malign-jumps%> is obsolete, " + "use %<-falign-jumps%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-jumps=%d is not between 0 and %d", + error_at (loc, "%<-malign-jumps=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_jumps, value); @@ -1356,9 +1358,10 @@ ix86_handle_option (struct gcc_options *opts, case OPT_malign_functions_: warning_at (loc, 0, - "-malign-functions is obsolete, use -falign-functions"); + "%<-malign-functions%> is obsolete, " + "use %<-falign-functions%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-functions=%d is not between 0 and %d", + error_at (loc, "%<-malign-functions=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_functions, value); @@ -1367,7 +1370,7 @@ ix86_handle_option (struct gcc_options *opts, case OPT_mbranch_cost_: if (value > 5) { - error_at (loc, "-mbranch-cost=%d is not between 0 and 5", value); + error_at (loc, "%<-mbranch-cost=%d%> is not between 0 and 5", value); opts->x_ix86_branch_cost = 5; } return true; diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64-common.c index e8410b1..02e297a 100644 --- a/gcc/common/config/ia64/ia64-common.c +++ b/gcc/common/config/ia64/ia64-common.c @@ -55,7 +55,7 @@ ia64_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, { case OPT_mtls_size_: if (value != 14 && value != 22 && value != 64) - error_at (loc, "bad value %<%s%> for -mtls-size= switch", arg); + error_at (loc, "bad value %<%s%> for %<-mtls-size=%> switch", arg); return true; default: diff --git a/gcc/common/config/m68k/m68k-common.c b/gcc/common/config/m68k/m68k-common.c index 05b23d5..f13e0f9 100644 --- a/gcc/common/config/m68k/m68k-common.c +++ b/gcc/common/config/m68k/m68k-common.c @@ -57,7 +57,7 @@ m68k_handle_option (struct gcc_options *opts, case OPT_mshared_library_id_: if (value > MAX_LIBRARY_ID) - error_at (loc, "-mshared-library-id=%s is not between 0 and %d", + error_at (loc, "%<-mshared-library-id=%s%> is not between 0 and %d", arg, MAX_LIBRARY_ID); else { diff --git a/gcc/common/config/msp430/msp430-common.c b/gcc/common/config/msp430/msp430-common.c index 7ff12c6..166abf7 100644 --- a/gcc/common/config/msp430/msp430-common.c +++ b/gcc/common/config/msp430/msp430-common.c @@ -54,7 +54,7 @@ msp430_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, } else { - error ("unrecognized argument of -mcpu: %s", decoded->arg); + error ("unrecognized argument of %<-mcpu%>: %s", decoded->arg); return false; } break; diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index e3d910e..85f672f 100644 --- a/gcc/common/config/nds32/nds32-common.c +++ b/gcc/common/config/nds32/nds32-common.c @@ -46,8 +46,7 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check the valid vector size: 4 or 16. */ if (value != 4 && value != 16) { - error_at (loc, "for the option -misr-vector-size=X, the valid X " - "must be: 4 or 16"); + error_at (loc, "%<-misr-vector-size=%d%> argument must be 4 or 16", value); return false; } @@ -57,8 +56,8 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check the valid security level: 0 1 2 3. */ if (value < 0 || value > 3) { - error_at (loc, "for the option -misr-secure=X, the valid X " - "must be: 0, 1, 2, or 3"); + error_at (loc, "%<-misr-secure=%d%> argument not in between 0 and 3", + value); return false; } return true; @@ -67,7 +66,7 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check valid value: 4 8 16 32 64 128 256 512. */ if (exact_log2 (value) < 2 || exact_log2 (value) > 9) { - error_at (loc, "for the option -mcache-block-size=X, the valid X " + error_at (loc, "for the option %<-mcache-block-size=X%>, the valid X " "must be: 4, 8, 16, 32, 64, 128, 256, or 512"); return false; } diff --git a/gcc/common/config/powerpcspe/powerpcspe-common.c b/gcc/common/config/powerpcspe/powerpcspe-common.c index 5f70666..c949a60 100644 --- a/gcc/common/config/powerpcspe/powerpcspe-common.c +++ b/gcc/common/config/powerpcspe/powerpcspe-common.c @@ -170,7 +170,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, else if (! strcmp (q, "builtin")) mask = MASK_DEBUG_BUILTIN; else - error_at (loc, "unknown -mdebug-%s switch", q); + error_at (loc, "unknown %<-mdebug-%s%> switch", q); if (invert) opts->x_rs6000_debug &= ~mask; @@ -218,7 +218,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_mlong_double_: if (value != 64 && value != 128) { - error_at (loc, "unknown switch -mlong-double-%s", arg); + error_at (loc, "unknown switch %<-mlong-double-%s%>", arg); opts->x_rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE; return false; @@ -228,7 +228,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_msingle_float: if (!TARGET_SINGLE_FPU) warning_at (loc, 0, - "-msingle-float option equivalent to -mhard-float"); + "%<-msingle-float%> option equivalent to %<-mhard-float%>"); /* -msingle-float implies -mno-double-float and TARGET_HARD_FLOAT. */ opts->x_rs6000_double_float = 0; opts->x_rs6000_isa_flags &= ~OPTION_MASK_SOFT_FLOAT; @@ -244,7 +244,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_msimple_fpu: if (!TARGET_SINGLE_FPU) - warning_at (loc, 0, "-msimple-fpu option ignored"); + warning_at (loc, 0, "%<-msimple-fpu%> option ignored"); break; case OPT_mhard_float: diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 16ddb26..72c43c6 100644 --- a/gcc/common/config/riscv/riscv-common.c +++ b/gcc/common/config/riscv/riscv-common.c @@ -250,7 +250,7 @@ riscv_subset_list::parsing_subset_version (const char *p, } else { - error_at (m_loc, "-march=%s: Expect number after `%dp'.", + error_at (m_loc, "%<-march=%s%>: Expect number after `%dp'.", m_arch, version); return NULL; } @@ -326,8 +326,8 @@ riscv_subset_list::parse_std_ext (const char *p) if (m_xlen > 32) { - error_at (m_loc, "-march=%s: rv%de is not a valid base ISA", m_arch, - m_xlen); + error_at (m_loc, "%<-march=%s%>: rv%de is not a valid base ISA", + m_arch, m_xlen); return NULL; } break; @@ -348,8 +348,8 @@ riscv_subset_list::parse_std_ext (const char *p) break; default: - error_at (m_loc, "-march=%s: first ISA subset must be `e', `i' or `g'", - m_arch); + error_at (m_loc, "%<-march=%s%>: first ISA subset must be `e', " + "`i' or `g'", m_arch); return NULL; } @@ -375,12 +375,12 @@ riscv_subset_list::parse_std_ext (const char *p) if (std_ext != *std_exts) { if (strchr (all_std_exts, std_ext) == NULL) - error_at (m_loc, "-march=%s: unsupported ISA subset `%c'", + error_at (m_loc, "%<-march=%s%>: unsupported ISA subset `%c'", m_arch, *p); else error_at (m_loc, - "-march=%s: ISA string is not in canonical order. `%c'", - m_arch, *p); + "%<-march=%s%>: ISA string is not in canonical order. " + "`%c'", m_arch, *p); return NULL; } @@ -455,7 +455,7 @@ riscv_subset_list::parse_sv_or_non_std_ext (const char *p, if (*p != '\0' && *p != '_') { - error_at (m_loc, "-march=%s: %s must separate with _", + error_at (m_loc, "%<-march=%s%>: %s must separate with _", m_arch, ext_type_str); return NULL; } @@ -483,7 +483,7 @@ riscv_subset_list::parse (const char *arch, location_t loc) } else { - error_at (loc, "-march=%s: ISA string must begin with rv32 or rv64", + error_at (loc, "%<-march=%s%>: ISA string must begin with rv32 or rv64", arch); goto fail; } diff --git a/gcc/common/config/rs6000/rs6000-common.c b/gcc/common/config/rs6000/rs6000-common.c index 30d7000..9857b54 100644 --- a/gcc/common/config/rs6000/rs6000-common.c +++ b/gcc/common/config/rs6000/rs6000-common.c @@ -178,7 +178,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, else if (! strcmp (q, "builtin")) mask = MASK_DEBUG_BUILTIN; else - error_at (loc, "unknown -mdebug-%s switch", q); + error_at (loc, "unknown %<-mdebug-%s%> switch", q); if (invert) opts->x_rs6000_debug &= ~mask; @@ -217,7 +217,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_mlong_double_: if (value != 64 && value != 128) { - error_at (loc, "unknown switch -mlong-double-%s", arg); + error_at (loc, "unknown switch %<-mlong-double-%s%>", arg); opts->x_rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE; return false; diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index f13f268..252bed7 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11151,7 +11151,7 @@ aarch64_parse_one_option_token (const char *token, return flag->flag; } - error ("unknown flag passed in -moverride=%s (%s)", option_name, token); + error ("unknown flag passed in %<-moverride=%s%> (%s)", option_name, token); return 0; } @@ -11454,8 +11454,8 @@ aarch64_override_options_internal (struct gcc_options *opts) if (aarch64_stack_protector_guard == SSP_GLOBAL && opts->x_aarch64_stack_protector_guard_offset_str) { - error ("incompatible options -mstack-protector-guard=global and" - "-mstack-protector-guard-offset=%qs", + error ("incompatible options %<-mstack-protector-guard=global%> and" + "%<-mstack-protector-guard-offset=%qs%>", aarch64_stack_protector_guard_offset_str); } @@ -11463,9 +11463,9 @@ aarch64_override_options_internal (struct gcc_options *opts) && !(opts->x_aarch64_stack_protector_guard_offset_str && opts->x_aarch64_stack_protector_guard_reg_str)) { - error ("both -mstack-protector-guard-offset and " - "-mstack-protector-guard-reg must be used " - "with -mstack-protector-guard=sysreg"); + error ("both %<-mstack-protector-guard-offset%> and " + "%<-mstack-protector-guard-reg%> must be used " + "with %<-mstack-protector-guard=sysreg%>"); } if (opts->x_aarch64_stack_protector_guard_reg_str) @@ -11482,7 +11482,7 @@ aarch64_override_options_internal (struct gcc_options *opts) long offs = strtol (aarch64_stack_protector_guard_offset_str, &end, 0); if (!*str || *end || errno) error ("%qs is not a valid offset in %qs", str, - "-mstack-protector-guard-offset="); + "%<-mstack-protector-guard-offset=%>"); aarch64_stack_protector_guard_offset = offs; } @@ -11687,7 +11687,7 @@ aarch64_validate_mcpu (const char *str, const struct processor **res, error ("missing cpu name in %<-mcpu=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -mcpu", str); + error ("unknown value %qs for %<-mcpu%>", str); aarch64_print_hint_for_core (str); break; case AARCH64_PARSE_INVALID_FEATURE: @@ -11828,7 +11828,7 @@ aarch64_validate_march (const char *str, const struct processor **res, error ("missing arch name in %<-march=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -march", str); + error ("unknown value %qs for %<-march%>", str); aarch64_print_hint_for_arch (str); break; case AARCH64_PARSE_INVALID_FEATURE: @@ -11863,7 +11863,7 @@ aarch64_validate_mtune (const char *str, const struct processor **res) error ("missing cpu name in %<-mtune=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -mtune", str); + error ("unknown value %qs for %<-mtune%>", str); aarch64_print_hint_for_core (str); break; default: @@ -11988,7 +11988,7 @@ aarch64_override_options (void) { if (selected_arch->arch != selected_cpu->arch) { - warning (0, "switch -mcpu=%s conflicts with -march=%s switch", + warning (0, "switch %<-mcpu=%s%> conflicts with %<-march=%s%> switch", all_architectures[selected_cpu->arch].name, selected_arch->name); } @@ -12044,14 +12044,14 @@ aarch64_override_options (void) /* The compiler may have been configured with 2.23.* binutils, which does not have support for ILP32. */ if (TARGET_ILP32) - error ("assembler does not support -mabi=ilp32"); + error ("assembler does not support %<-mabi=ilp32%>"); #endif /* Convert -msve-vector-bits to a VG count. */ aarch64_sve_vg = aarch64_convert_sve_vector_bits (aarch64_sve_vector_bits); if (aarch64_ra_sign_scope != AARCH64_FUNCTION_NONE && TARGET_ILP32) - sorry ("return address signing is only supported for -mabi=lp64"); + sorry ("return address signing is only supported for %<-mabi=lp64%>"); /* Make sure we properly set up the explicit options. */ if ((aarch64_cpu_string && valid_cpu) @@ -12119,7 +12119,7 @@ initialize_aarch64_code_model (struct gcc_options *opts) #endif break; case AARCH64_CMODEL_LARGE: - sorry ("code model %qs with -f%s", "large", + sorry ("code model %qs with %<-f%s%>", "large", opts->x_flag_pic > 1 ? "PIC" : "pic"); break; default: diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index f0e8124..984540f 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -417,7 +417,8 @@ alpha_option_override (void) else if (! strcmp (alpha_tp_string, "i")) alpha_tp = ALPHA_TP_INSN; else - error ("bad value %qs for -mtrap-precision switch", alpha_tp_string); + error ("bad value %qs for %<-mtrap-precision%> switch", + alpha_tp_string); } if (alpha_fprm_string) @@ -431,7 +432,7 @@ alpha_option_override (void) else if (! strcmp (alpha_fprm_string,"d")) alpha_fprm = ALPHA_FPRM_DYN; else - error ("bad value %qs for -mfp-rounding-mode switch", + error ("bad value %qs for %<-mfp-rounding-mode%> switch", alpha_fprm_string); } @@ -446,7 +447,8 @@ alpha_option_override (void) else if (strcmp (alpha_fptm_string, "sui") == 0) alpha_fptm = ALPHA_FPTM_SUI; else - error ("bad value %qs for -mfp-trap-mode switch", alpha_fptm_string); + error ("bad value %qs for %<-mfp-trap-mode%> switch", + alpha_fptm_string); } if (alpha_cpu_string) @@ -463,7 +465,7 @@ alpha_option_override (void) break; } if (i == ct_size) - error ("bad value %qs for -mcpu switch", alpha_cpu_string); + error ("bad value %qs for %<-mcpu%> switch", alpha_cpu_string); } if (alpha_tune_string) @@ -478,7 +480,7 @@ alpha_option_override (void) break; } if (i == ct_size) - error ("bad value %qs for -mtune switch", alpha_tune_string); + error ("bad value %qs for %<-mtune%> switch", alpha_tune_string); } if (line_size) @@ -499,7 +501,7 @@ alpha_option_override (void) if ((alpha_fptm == ALPHA_FPTM_SU || alpha_fptm == ALPHA_FPTM_SUI) && alpha_tp != ALPHA_TP_INSN && alpha_cpu != PROCESSOR_EV6) { - warning (0, "fp software completion requires -mtrap-precision=i"); + warning (0, "fp software completion requires %<-mtrap-precision=i%>"); alpha_tp = ALPHA_TP_INSN; } @@ -567,7 +569,8 @@ alpha_option_override (void) } else { - warning (0, "bad value %qs for -mmemory-latency", alpha_mlat_string); + warning (0, "bad value %qs for %<-mmemory-latency%>", + alpha_mlat_string); lat = 3; } diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 3b8c299..581833b 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -933,10 +933,10 @@ arc_init (void) /* MPY instructions valid only for ARC700 or ARCv2. */ if (TARGET_NOMPY_SET && TARGET_ARC600_FAMILY) - error ("-mno-mpy supported only for ARC700 or ARCv2"); + error ("%<-mno-mpy%> supported only for ARC700 or ARCv2"); if (!TARGET_DPFP && TARGET_DPFP_DISABLE_LRSR) - error ("-mno-dpfp-lrsr supported only with -mdpfp"); + error ("%<-mno-dpfp-lrsr%> supported only with %<-mdpfp%>"); /* FPX-1. No fast and compact together. */ if ((TARGET_DPFP_FAST_SET && TARGET_DPFP_COMPACT_SET) @@ -945,7 +945,7 @@ arc_init (void) /* FPX-2. No fast-spfp for arc600 or arc601. */ if (TARGET_SPFP_FAST_SET && TARGET_ARC600_FAMILY) - error ("-mspfp_fast not available on ARC600 or ARC601"); + error ("%<-mspfp_fast%> not available on ARC600 or ARC601"); /* FPX-4. No FPX extensions mixed with FPU extensions. */ if ((TARGET_DPFP_FAST_SET || TARGET_DPFP_COMPACT_SET || TARGET_SPFP) @@ -1110,7 +1110,7 @@ parse_mrgf_banked_regs_option (const char *arg) if (errno != 0 || *arg == '\0' || *end_ptr != '\0' || (val != 0 && val != 4 && val != 8 && val != 16 && val != 32)) { - error ("invalid number in -mrgf-banked-regs=%s " + error ("invalid number in %<-mrgf-banked-regs=%s%> " "valid values are 0, 4, 8, 16, or 32", arg); return; } @@ -1172,7 +1172,8 @@ arc_override_options (void) irq_range (opt->arg); else warning (OPT_mirq_ctrl_saved_, - "option -mirq-ctrl-saved valid only for ARC v2 processors"); + "option %<-mirq-ctrl-saved%> valid only " + "for ARC v2 processors"); break; case OPT_mrgf_banked_regs_: @@ -1180,7 +1181,8 @@ arc_override_options (void) parse_mrgf_banked_regs_option (opt->arg); else warning (OPT_mrgf_banked_regs_, - "option -mrgf-banked-regs valid only for ARC v2 processors"); + "option %<-mrgf-banked-regs%> valid only for " + "ARC v2 processors"); break; default: @@ -6791,7 +6793,7 @@ arc_expand_builtin_aligned (tree exp) /* If we can't fold the alignment to a constant integer whilst optimizing, this is probably a user error. */ if (optimize) - warning (0, "__builtin_arc_aligned with non-constant alignment"); + warning (0, "%<__builtin_arc_aligned%> with non-constant alignment"); } else { @@ -6799,7 +6801,7 @@ arc_expand_builtin_aligned (tree exp) /* Check alignTest is positive, and a power of two. */ if (alignTest <= 0 || alignTest != (alignTest & -alignTest)) { - error ("invalid alignment value for __builtin_arc_aligned"); + error ("invalid alignment value for %<__builtin_arc_aligned%>"); return NULL_RTX; } diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index f646ab5..55bbb48 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -2514,7 +2514,7 @@ arm_expand_neon_builtin (int fcode, tree exp, rtx target) { fatal_error (input_location, "You must enable NEON instructions" - " (e.g. -mfloat-abi=softfp -mfpu=neon)" + " (e.g. %<-mfloat-abi=softfp%> %<-mfpu=neon%>)" " to use these intrinsics."); return const0_rtx; } @@ -2612,7 +2612,8 @@ arm_expand_builtin (tree exp, { fatal_error (input_location, "You must enable crypto instructions" - " (e.g. include -mfloat-abi=softfp -mfpu=crypto-neon...)" + " (e.g. include %<-mfloat-abi=softfp%> " + "%<-mfpu=crypto-neon%>)" " to use these intrinsics."); return const0_rtx; } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 69b74a2..67f1a9c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2884,14 +2884,15 @@ arm_option_check_internal (struct gcc_options *opts) && write_symbols != NO_DEBUG && !TARGET_APCS_FRAME && (TARGET_DEFAULT & MASK_APCS_FRAME)) - warning (0, "-g with -mno-apcs-frame may not give sensible debugging"); + warning (0, "%<-g%> with %<-mno-apcs-frame%> may not give sensible " + "debugging"); /* iWMMXt unsupported under Thumb mode. */ if (TARGET_THUMB_P (flags) && TARGET_IWMMXT) error ("iWMMXt unsupported under Thumb mode"); if (TARGET_HARD_TP && TARGET_THUMB1_P (flags)) - error ("cannot use -mtp=cp15 with 16-bit Thumb"); + error ("cannot use %<-mtp=cp15%> with 16-bit Thumb"); if (TARGET_THUMB_P (flags) && TARGET_VXWORKS_RTP && flag_pic) { @@ -2913,7 +2914,7 @@ arm_option_check_internal (struct gcc_options *opts) /* Cannot load addresses: -mslow-flash-data forbids literal pool and -mword-relocations forbids relocation of MOVT/MOVW. */ if (target_word_relocations) - error ("%s incompatible with -mword-relocations", flag); + error ("%s incompatible with %<-mword-relocations%>", flag); } } @@ -3181,7 +3182,8 @@ arm_configure_build_target (struct arm_build_target *target, if (!bitmap_empty_p (isa_delta)) { if (warn_compatible) - warning (0, "switch -mcpu=%s conflicts with -march=%s switch", + warning (0, "switch %<-mcpu=%s%> conflicts " + "with %<-march=%s%> switch", arm_selected_cpu->common.name, arm_selected_arch->common.name); /* -march wins for code generation. @@ -3406,7 +3408,8 @@ arm_option_override (void) if (TARGET_APCS_STACK && !TARGET_APCS_FRAME) { - warning (0, "-mapcs-stack-check incompatible with -mno-apcs-frame"); + warning (0, "%<-mapcs-stack-check%> incompatible with " + "%<-mno-apcs-frame%>"); target_flags |= MASK_APCS_FRAME; } @@ -3414,7 +3417,7 @@ arm_option_override (void) target_flags |= MASK_APCS_FRAME; if (TARGET_APCS_REENT && flag_pic) - error ("-fpic and -mapcs-reent are incompatible"); + error ("%<-fpic%> and %<-mapcs-reent%> are incompatible"); if (TARGET_APCS_REENT) warning (0, "APCS reentrant code not supported. Ignored"); @@ -3475,7 +3478,7 @@ arm_option_override (void) if (flag_pic && TARGET_SINGLE_PIC_BASE) { if (TARGET_VXWORKS_RTP) - warning (0, "RTP PIC is incompatible with -msingle-pic-base"); + warning (0, "RTP PIC is incompatible with %<-msingle-pic-base%>"); arm_pic_register = (TARGET_APCS_STACK || TARGET_AAPCS_BASED) ? 9 : 10; } @@ -3487,7 +3490,7 @@ arm_option_override (void) int pic_register = decode_reg_name (arm_pic_register_string); if (!flag_pic) - warning (0, "-mpic-register= is useless without -fpic"); + warning (0, "%<-mpic-register=%> is useless without %<-fpic%>"); /* Prevent the user from choosing an obviously stupid PIC register. */ else if (pic_register < 0 || call_used_regs[pic_register] @@ -3518,7 +3521,8 @@ arm_option_override (void) if (flag_reorder_blocks_and_partition) { inform (input_location, - "-freorder-blocks-and-partition not supported on this architecture"); + "%<-freorder-blocks-and-partition%> not supported " + "on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } @@ -3733,10 +3737,10 @@ arm_options_perform_arch_sanity_checks (void) if (TARGET_AAPCS_BASED) { if (TARGET_CALLER_INTERWORKING) - error ("AAPCS does not support -mcaller-super-interworking"); + error ("AAPCS does not support %<-mcaller-super-interworking%>"); else if (TARGET_CALLEE_INTERWORKING) - error ("AAPCS does not support -mcallee-super-interworking"); + error ("AAPCS does not support %<-mcallee-super-interworking%>"); } /* __fp16 support currently assumes the core has ldrh. */ @@ -3760,7 +3764,7 @@ arm_options_perform_arch_sanity_checks (void) { arm_pcs_default = ARM_PCS_AAPCS_VFP; if (!bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv2)) - error ("-mfloat-abi=hard: selected processor lacks an FPU"); + error ("%<-mfloat-abi=hard%>: selected processor lacks an FPU"); } else arm_pcs_default = ARM_PCS_AAPCS; @@ -3768,7 +3772,7 @@ arm_options_perform_arch_sanity_checks (void) else { if (arm_float_abi == ARM_FLOAT_ABI_HARD) - sorry ("-mfloat-abi=hard and VFP"); + sorry ("%<-mfloat-abi=hard%> and VFP"); if (arm_abi == ARM_ABI_APCS) arm_pcs_default = ARM_PCS_APCS; @@ -7039,8 +7043,8 @@ arm_handle_cmse_nonsecure_entry (tree *node, tree name, if (!use_cmse) { *no_add_attrs = true; - warning (OPT_Wattributes, "%qE attribute ignored without -mcmse option.", - name); + warning (OPT_Wattributes, "%qE attribute ignored without %<-mcmse%> " + "option.", name); return NULL_TREE; } @@ -7091,8 +7095,8 @@ arm_handle_cmse_nonsecure_call (tree *node, tree name, if (!use_cmse) { *no_add_attrs = true; - warning (OPT_Wattributes, "%qE attribute ignored without -mcmse option.", - name); + warning (OPT_Wattributes, "%qE attribute ignored without %<-mcmse%> " + "option.", name); return NULL_TREE; } @@ -8882,7 +8886,7 @@ arm_tls_referenced_p (rtx x) currently implement these if a literal pool is disabled. */ if (arm_disable_literal_pool) sorry ("accessing thread-local storage is not currently supported " - "with -mpure-code or -mslow-flash-data"); + "with %<-mpure-code%> or %<-mslow-flash-data%>"); return true; } @@ -25414,7 +25418,7 @@ thumb1_expand_prologue (void) if ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK || flag_stack_clash_protection) && size) - sorry ("-fstack-check=specific for Thumb-1"); + sorry ("%<-fstack-check=specific%> for Thumb-1"); amount = offsets->outgoing_args - offsets->saved_regs; amount -= 4 * thumb1_extra_regs_pushed (offsets, true); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a53b909..a9f72b3 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -762,13 +762,13 @@ avr_option_override (void) } if (flag_pic == 1) - warning (OPT_fpic, "-fpic is not supported"); + warning (OPT_fpic, "%<-fpic%> is not supported"); if (flag_pic == 2) - warning (OPT_fPIC, "-fPIC is not supported"); + warning (OPT_fPIC, "%<-fPIC%> is not supported"); if (flag_pie == 1) - warning (OPT_fpie, "-fpie is not supported"); + warning (OPT_fpie, "%<-fpie%> is not supported"); if (flag_pie == 2) - warning (OPT_fPIE, "-fPIE is not supported"); + warning (OPT_fPIE, "%<-fPIE%> is not supported"); #if !defined (HAVE_AS_AVR_MGCCISR_OPTION) avr_gasisr_prologues = 0; diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 51cfc51..97c2c12 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -2379,16 +2379,19 @@ bfin_option_override (void) #ifdef SUBTARGET_FDPIC_NOT_SUPPORTED if (TARGET_FDPIC) - error ("-mfdpic is not supported, please use a bfin-linux-uclibc target"); + error ("%<-mfdpic%> is not supported, please use a bfin-linux-uclibc " + "target"); #endif /* Library identification */ if (global_options_set.x_bfin_library_id && ! TARGET_ID_SHARED_LIBRARY) - error ("-mshared-library-id= specified without -mid-shared-library"); + error ("%<-mshared-library-id=%> specified without " + "%<-mid-shared-library%>"); if (stack_limit_rtx && TARGET_FDPIC) { - warning (0, "-fstack-limit- options are ignored with -mfdpic; use -mstack-check-l1"); + warning (0, "%<-fstack-limit-%> options are ignored with %<-mfdpic%>; " + "use %<-mstack-check-l1%>"); stack_limit_rtx = NULL_RTX; } @@ -2401,7 +2404,7 @@ bfin_option_override (void) /* Don't allow the user to specify -mid-shared-library and -msep-data together, as it makes little sense from a user's point of view... */ if (TARGET_SEP_DATA && TARGET_ID_SHARED_LIBRARY) - error ("cannot specify both -msep-data and -mid-shared-library"); + error ("cannot specify both %<-msep-data%> and %<-mid-shared-library%>"); /* ... internally, however, it's nearly the same. */ if (TARGET_SEP_DATA) target_flags |= MASK_ID_SHARED_LIBRARY | MASK_LEAF_ID_SHARED_LIBRARY; @@ -2421,16 +2424,16 @@ bfin_option_override (void) flag_pic = 0; if (TARGET_MULTICORE && bfin_cpu_type != BFIN_CPU_BF561) - error ("-mmulticore can only be used with BF561"); + error ("%<-mmulticore%> can only be used with BF561"); if (TARGET_COREA && !TARGET_MULTICORE) - error ("-mcorea should be used with -mmulticore"); + error ("%<-mcorea%> should be used with %<-mmulticore%>"); if (TARGET_COREB && !TARGET_MULTICORE) - error ("-mcoreb should be used with -mmulticore"); + error ("%<-mcoreb%> should be used with %<-mmulticore%>"); if (TARGET_COREA && TARGET_COREB) - error ("-mcorea and -mcoreb can%'t be used together"); + error ("%<-mcorea%> and %<-mcoreb%> can%'t be used together"); flag_schedule_insns = 0; diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 37f3021..9a07c40 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -239,7 +239,8 @@ c6x_option_override (void) if (flag_pic && !TARGET_DSBT) { - error ("-fpic and -fPIC not supported without -mdsbt on this target"); + error ("%<-fpic%> and %<-fPIC%> not supported without %<-mdsbt%> " + "on this target"); flag_pic = 0; } c6x_initial_flag_pic = flag_pic; diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c index ffa45bb..42b9e04 100644 --- a/gcc/config/cr16/cr16.c +++ b/gcc/config/cr16/cr16.c @@ -306,7 +306,8 @@ cr16_override_options (void) error ("data-model=far not valid for cr16c architecture"); } else - error ("invalid data model option -mdata-model=%s", cr16_data_model); + error ("invalid data model option %<-mdata-model=%s%>", + cr16_data_model); } else data_model = DM_DEFAULT; diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 9b580ce..591941b 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2651,7 +2651,8 @@ cris_option_override (void) /* Do some sanity checking. */ if (cris_max_stackframe < 0 || cris_max_stackframe > 0x20000000) - internal_error ("-max-stackframe=%d is not usable, not between 0 and %d", + internal_error ("%<-max-stackframe=%d%> is not usable, " + "not between 0 and %d", cris_max_stackframe, 0x20000000); } @@ -2679,8 +2680,8 @@ cris_option_override (void) cris_cpu_version = 10; if (cris_cpu_version < 0 || cris_cpu_version > 32) - error ("unknown CRIS version specification in -march= or -mcpu= : %s", - cris_cpu_str); + error ("unknown CRIS version specification in %<-march=%> or " + "%<-mcpu=%> : %s", cris_cpu_str); /* Set the target flags. */ if (cris_cpu_version >= CRIS_CPU_ETRAX4) @@ -2715,7 +2716,7 @@ cris_option_override (void) cris_tune = 10; if (cris_tune < 0 || cris_tune > 32) - error ("unknown CRIS cpu version specification in -mtune= : %s", + error ("unknown CRIS cpu version specification in %<-mtune=%> : %s", cris_tune_str); if (cris_tune >= CRIS_CPU_SVINTO) @@ -2736,7 +2737,8 @@ cris_option_override (void) further errors. */ if (! TARGET_LINUX) { - error ("-fPIC and -fpic are not supported in this configuration"); + error ("%<-fPIC%> and %<-fpic%> are not supported " + "in this configuration"); flag_pic = 0; } diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index 8a3c909..e4ac933 100644 --- a/gcc/config/csky/csky.c +++ b/gcc/config/csky/csky.c @@ -6035,7 +6035,7 @@ csky_handle_isr_attribute (tree *node, tree name, tree args, int flags, if (!TARGET_ISTACK) { - warning (OPT_Wattributes, "%qE attribute ignored without -mistack", + warning (OPT_Wattributes, "%qE attribute ignored without %<-mistack%>", name); *no_add_attrs = true; return NULL_TREE; diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index ff91575..d74d9a5 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -715,7 +715,7 @@ macosx_version_as_macro (void) return version_macro; fail: - error ("unknown value %qs of -mmacosx-version-min", + error ("unknown value %qs of %<-mmacosx-version-min%>", darwin_macosx_version_min); return "1000"; } diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 9194811..f62f1c7 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3173,7 +3173,7 @@ darwin_override_options (void) if (global_options_set.x_dwarf_split_debug_info) { inform (input_location, - "-gsplit-dwarf is not supported on this platform, ignored"); + "%<-gsplit-dwarf%> is not supported on this platform, ignored"); dwarf_split_debug_info = 0; global_options_set.x_dwarf_split_debug_info = 0; } @@ -3203,8 +3203,8 @@ darwin_override_options (void) && !global_options_set.x_flag_asynchronous_unwind_tables))) { inform (input_location, - "-freorder-blocks-and-partition does not work with exceptions " - "on this architecture"); + "%<-freorder-blocks-and-partition%> does not work with " + "exceptions on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 1aa0938..71bf819 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -9115,7 +9115,7 @@ frv_expand_builtin (tree exp, if (fcode < FRV_BUILTIN_FIRST_NONMEDIA && !TARGET_MEDIA) { - error ("media functions are not available unless -mmedia is used"); + error ("media functions are not available unless %<-mmedia%> is used"); return NULL_RTX; } diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 805ed72..b68ee39 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -326,7 +326,7 @@ h8300_option_override (void) #ifndef OBJECT_FORMAT_ELF if (TARGET_H8300SX) { - error ("-msx is not supported in coff"); + error ("%<-msx%> is not supported in coff"); target_flags |= MASK_H8300S; } #endif @@ -348,44 +348,44 @@ h8300_option_override (void) if (!TARGET_H8300S && TARGET_MAC) { - error ("-ms2600 is used without -ms"); + error ("%<-ms2600%> is used without %<-ms%>"); target_flags |= MASK_H8300S_1; } if (TARGET_H8300 && TARGET_NORMAL_MODE) { - error ("-mn is used without -mh or -ms or -msx"); + error ("%<-mn%> is used without %<-mh%> or %<-ms%> or %<-msx%>"); target_flags ^= MASK_NORMAL_MODE; } if (! TARGET_H8300S && TARGET_EXR) { - error ("-mexr is used without -ms"); + error ("%<-mexr%> is used without %<-ms%>"); target_flags |= MASK_H8300S_1; } if (TARGET_H8300 && TARGET_INT32) { - error ("-mint32 is not supported for H8300 and H8300L targets"); + error ("%<-mint32%> is not supported for H8300 and H8300L targets"); target_flags ^= MASK_INT32; } if ((!TARGET_H8300S && TARGET_EXR) && (!TARGET_H8300SX && TARGET_EXR)) { - error ("-mexr is used without -ms or -msx"); + error ("%<-mexr%> is used without %<-ms%> or %<-msx%>"); target_flags |= MASK_H8300S_1; } if ((!TARGET_H8300S && TARGET_NEXR) && (!TARGET_H8300SX && TARGET_NEXR)) { - warning (OPT_mno_exr, "-mno-exr valid only with -ms or -msx \ - - Option ignored!"); + warning (OPT_mno_exr, "%<-mno-exr%> valid only with %<-ms%> or " + "%<-msx%> - Option ignored!"); } #ifdef H8300_LINUX if ((TARGET_NORMAL_MODE)) { - error ("-mn is not supported for linux targets"); + error ("%<-mn%> is not supported for linux targets"); target_flags ^= MASK_NORMAL_MODE; } #endif diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e50938c..a4a7fbc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3553,8 +3553,8 @@ parse_mtune_ctrl_str (bool dump) } } if (i == X86_TUNE_LAST) - error ("unknown parameter to option -mtune-ctrl: %s", - clear ? curr_feature_string - 1 : curr_feature_string); + error ("unknown parameter to option %<-mtune-ctrl%>: %s", + clear ? curr_feature_string - 1 : curr_feature_string); curr_feature_string = next_feature_string; } while (curr_feature_string); @@ -3750,7 +3750,7 @@ ix86_option_override_internal (bool main_args_p, && !TARGET_64BIT_P (opts->x_ix86_isa_flags)) { /* rep; movq isn't available in 32-bit code. */ - error ("-mstringop-strategy=rep_8byte not supported for 32-bit code"); + error ("%<-mstringop-strategy=rep_8byte%> not supported for 32-bit code"); opts->x_ix86_stringop_alg = no_stringop; } @@ -3779,7 +3779,7 @@ ix86_option_override_internal (bool main_args_p, opts->x_ix86_abi = DEFAULT_ABI; if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags)) - error ("-mabi=ms not supported with X32 ABI"); + error ("%<-mabi=ms%> not supported with X32 ABI"); gcc_assert (opts->x_ix86_abi == SYSV_ABI || opts->x_ix86_abi == MS_ABI); if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) && opts->x_ix86_abi == MS_ABI) @@ -3871,7 +3871,7 @@ ix86_option_override_internal (bool main_args_p, } if (TARGET_MACHO && opts->x_ix86_asm_dialect == ASM_INTEL) { - error ("-masm=intel not supported in this configuration"); + error ("%<-masm=intel%> not supported in this configuration"); opts->x_ix86_asm_dialect = ASM_ATT; } if ((TARGET_64BIT_P (opts->x_ix86_isa_flags) != 0) @@ -4326,12 +4326,12 @@ ix86_option_override_internal (bool main_args_p, if (opts_set->x_ix86_regparm) { if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) - warning (0, "-mregparm is ignored in 64-bit mode"); + warning (0, "%<-mregparm%> is ignored in 64-bit mode"); else if (TARGET_IAMCU_P (opts->x_target_flags)) - warning (0, "-mregparm is ignored for Intel MCU psABI"); + warning (0, "%<-mregparm%> is ignored for Intel MCU psABI"); if (opts->x_ix86_regparm > REGPARM_MAX) { - error ("-mregparm=%d is not between 0 and %d", + error ("%<-mregparm=%d%> is not between 0 and %d", opts->x_ix86_regparm, REGPARM_MAX); opts->x_ix86_regparm = 0; } @@ -4439,10 +4439,10 @@ ix86_option_override_internal (bool main_args_p, || opts->x_ix86_preferred_stack_boundary_arg > max) { if (min == max) - error ("-mpreferred-stack-boundary is not supported " + error ("%<-mpreferred-stack-boundary%> is not supported " "for this target"); else - error ("-mpreferred-stack-boundary=%d is not between %d and %d", + error ("%<-mpreferred-stack-boundary=%d%> is not between %d and %d", opts->x_ix86_preferred_stack_boundary_arg, min, max); } else @@ -4465,7 +4465,7 @@ ix86_option_override_internal (bool main_args_p, if (opts->x_ix86_incoming_stack_boundary_arg < min || opts->x_ix86_incoming_stack_boundary_arg > 12) - error ("-mincoming-stack-boundary=%d is not between %d and 12", + error ("%<-mincoming-stack-boundary=%d%> is not between %d and 12", opts->x_ix86_incoming_stack_boundary_arg, min); else { @@ -4478,10 +4478,10 @@ ix86_option_override_internal (bool main_args_p, #ifndef NO_PROFILE_COUNTERS if (flag_nop_mcount) - error ("-mnop-mcount is not compatible with this target"); + error ("%<-mnop-mcount%> is not compatible with this target"); #endif if (flag_nop_mcount && flag_pic) - error ("-mnop-mcount is not implemented for -fPIC"); + error ("%<-mnop-mcount%> is not implemented for %<-fPIC%>"); /* Accept -msseregparm only if at least SSE support is enabled. */ if (TARGET_SSEREGPARM_P (opts->x_target_flags) @@ -4683,14 +4683,14 @@ ix86_option_override_internal (bool main_args_p, { if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && opts->x_flag_pic && opts->x_flag_fentry) - sorry ("-mfentry isn%'t supported for 32-bit in combination " - "with -fpic"); + sorry ("%<-mfentry%> isn%'t supported for 32-bit in combination " + "with %<-fpic%>"); else if (TARGET_SEH && !opts->x_flag_fentry) - sorry ("-mno-fentry isn%'t compatible with SEH"); + sorry ("%<-mno-fentry%> isn%'t compatible with SEH"); } if (TARGET_SEH && TARGET_CALL_MS2SYSV_XLOGUES) - sorry ("-mcall-ms2sysv-xlogues isn%'t currently supported with SEH"); + sorry ("%<-mcall-ms2sysv-xlogues%> isn%'t currently supported with SEH"); if (!(opts_set->x_target_flags & MASK_VZEROUPPER) && TARGET_EMIT_VZEROUPPER) @@ -4755,7 +4755,7 @@ ix86_option_override_internal (bool main_args_p, if (i == ARRAY_SIZE (recip_options)) { - error ("unknown option for -mrecip=%s", q); + error ("unknown option for %<-mrecip=%s%>", q); invert = false; mask = RECIP_MASK_NONE; } @@ -4815,12 +4815,12 @@ ix86_option_override_internal (bool main_args_p, if (!*str || *endp || errno) error ("%qs is not a valid number " - "in -mstack-protector-guard-offset=", str); + "in %<-mstack-protector-guard-offset=%>", str); if (!IN_RANGE (offset, HOST_WIDE_INT_C (-0x80000000), HOST_WIDE_INT_C (0x7fffffff))) error ("%qs is not a valid offset " - "in -mstack-protector-guard-offset=", str); + "in %<-mstack-protector-guard-offset=%>", str); opts->x_ix86_stack_protector_guard_offset = offset; } @@ -4848,7 +4848,7 @@ ix86_option_override_internal (bool main_args_p, if (seg == ADDR_SPACE_GENERIC) error ("%qs is not a valid base register " - "in -mstack-protector-guard-reg=", + "in %<-mstack-protector-guard-reg=%>", opts->x_ix86_stack_protector_guard_reg_str); opts->x_ix86_stack_protector_guard_reg = seg; @@ -11336,7 +11336,7 @@ static void warn_once_call_ms2sysv_xlogues (const char *feature) static bool warned_once = false; if (!warned_once) { - warning (0, "-mcall-ms2sysv-xlogues is not compatible with %s", + warning (0, "%<-mcall-ms2sysv-xlogues%> is not compatible with %s", feature); warned_once = true; } @@ -13336,7 +13336,7 @@ ix86_expand_prologue (void) prologue variant. If so sorry. */ if (crtl->profile && flag_fentry != 0) sorry ("ms_hook_prologue attribute isn%'t compatible " - "with -mfentry for 32-bit"); + "with %<-mfentry%> for 32-bit"); /* In ix86_asm_output_function_label we emitted: 8b ff movl.s %edi,%edi @@ -14715,7 +14715,7 @@ split_stack_prologue_scratch_regno (void) { if (DECL_STATIC_CHAIN (cfun->decl)) { - sorry ("-fsplit-stack does not support fastcall with " + sorry ("%<-fsplit-stack%> does not support fastcall with " "nested function"); return INVALID_REGNUM; } @@ -14735,7 +14735,7 @@ split_stack_prologue_scratch_regno (void) { if (regparm >= 2) { - sorry ("-fsplit-stack does not support 2 register " + sorry ("%<-fsplit-stack%> does not support 2 register " "parameters for a nested function"); return INVALID_REGNUM; } @@ -14746,7 +14746,7 @@ split_stack_prologue_scratch_regno (void) { /* FIXME: We could make this work by pushing a register around the addition and comparison. */ - sorry ("-fsplit-stack does not support 3 register parameters"); + sorry ("%<-fsplit-stack%> does not support 3 register parameters"); return INVALID_REGNUM; } } @@ -29779,7 +29779,7 @@ ix86_warn_parameter_passing_abi (cumulative_args_t cum_v, tree type) return; warning (OPT_Wabi, "empty class %qT parameter passing ABI " - "changes in -fabi-version=12 (GCC 8)", type); + "changes in %<-fabi-version=12%> (GCC 8)", type); /* Only warn once. */ cum->warn_empty = false; diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 006f1d7..e8d905e 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -6024,7 +6024,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index bd389ea..7a0d6f7 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -524,7 +524,7 @@ m68k_option_override (void) if (m68k_arch_entry && (m68k_arch_entry->microarch != m68k_cpu_entry->microarch || (m68k_arch_entry->flags & ~m68k_cpu_entry->flags) != 0)) - warning (0, "-mcpu=%s conflicts with -march=%s", + warning (0, "%<-mcpu=%s%> conflicts with %<-march=%s%>", m68k_cpu_entry->name, m68k_arch_entry->name); entry = m68k_cpu_entry; @@ -583,7 +583,7 @@ m68k_option_override (void) * both specified together. Doing so simply doesn't make sense. */ if (TARGET_SEP_DATA && TARGET_ID_SHARED_LIBRARY) - error ("cannot specify both -msep-data and -mid-shared-library"); + error ("cannot specify both %<-msep-data%> and %<-mid-shared-library%>"); /* If we're generating code for a separate A5 relative data segment, * we've got to enable -fPIC as well. This might be relaxable to @@ -595,7 +595,7 @@ m68k_option_override (void) /* -mpcrel -fPIC uses 32-bit pc-relative displacements. Raise an error if the target does not support them. */ if (TARGET_PCREL && !TARGET_68020 && flag_pic == 2) - error ("-mpcrel -fPIC is not currently supported on selected cpu"); + error ("%<-mpcrel%> %<-fPIC%> is not currently supported on selected cpu"); /* ??? A historic way of turning on pic, or is this intended to be an embedded thing that doesn't have the same name binding @@ -659,14 +659,14 @@ m68k_option_override (void) int label_alignment = align_labels.levels[0].get_value (); if (label_alignment > 2) { - warning (0, "-falign-labels=%d is not supported", label_alignment); + warning (0, "%<-falign-labels=%d%> is not supported", label_alignment); str_align_labels = "1"; } int loop_alignment = align_loops.levels[0].get_value (); if (loop_alignment > 2) { - warning (0, "-falign-loops=%d is not supported", loop_alignment); + warning (0, "%<-falign-loops=%d%> is not supported", loop_alignment); str_align_loops = "1"; } #endif @@ -674,7 +674,7 @@ m68k_option_override (void) if ((opt_fstack_limit_symbol_arg != NULL || opt_fstack_limit_register_no >= 0) && !TARGET_68020) { - warning (0, "-fstack-limit- options are not supported on this cpu"); + warning (0, "%<-fstack-limit-%> options are not supported on this cpu"); opt_fstack_limit_symbol_arg = NULL; opt_fstack_limit_register_no = -1; } diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index aa6ef44..70910fd 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -1759,7 +1759,7 @@ microblaze_option_override (void) flag_pic = 2; if (!TARGET_SUPPORTS_PIC) { - error ("-fPIC/-fpic not supported for this target"); + error ("%<-fPIC%>/%<-fpic%> not supported for this target"); /* Clear it to avoid further errors. */ flag_pic = 0; } @@ -1771,7 +1771,7 @@ microblaze_option_override (void) ver = microblaze_version_to_int (microblaze_select_cpu); if (ver == -1) { - error ("%qs is an invalid argument to -mcpu=", microblaze_select_cpu); + error ("%qs is an invalid argument to %<-mcpu=%>", microblaze_select_cpu); } ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v3.00.a"); @@ -1820,7 +1820,8 @@ microblaze_option_override (void) { if (TARGET_MULTIPLY_HIGH) warning (0, - "-mxl-multiply-high can be used only with -mcpu=v6.00.a or greater"); + "%<-mxl-multiply-high%> can be used only with " + "%<-mcpu=v6.00.a%> or greater"); } ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v8.10.a"); @@ -1836,18 +1837,20 @@ microblaze_option_override (void) if (ver < 0) { if (TARGET_REORDER == 1) - warning (0, "-mxl-reorder can be used only with -mcpu=v8.30.a or greater"); + warning (0, "%<-mxl-reorder%> can be used only with " + "%<-mcpu=v8.30.a%> or greater"); TARGET_REORDER = 0; } else if ((ver == 0) && !TARGET_PATTERN_COMPARE) { if (TARGET_REORDER == 1) - warning (0, "-mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a"); + warning (0, "%<-mxl-reorder%> requires %<-mxl-pattern-compare%> for " + "%<-mcpu=v8.30.a%>"); TARGET_REORDER = 0; } if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) - error ("-mxl-multiply-high requires -mno-xl-soft-mul"); + error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); /* Always use DFA scheduler. */ microblaze_sched_use_dfa = 1; diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index a8022b8..4b42077 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -11951,7 +11951,7 @@ static void mips_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size) { if (TARGET_MIPS16) - sorry ("-fstack-check=specific not implemented for MIPS16"); + sorry ("%<-fstack-check=specific%> not implemented for MIPS16"); /* See if we have a constant small number of probes to generate. If so, that's the easy case. */ @@ -19598,7 +19598,7 @@ mips_set_compression_mode (unsigned int compression_mode) sorry ("MIPS16 PIC for ABIs other than o32 and o64"); if (TARGET_XGOT) - sorry ("MIPS16 -mxgot code"); + sorry ("MIPS16 %<-mxgot%> code"); if (TARGET_HARD_FLOAT_ABI && !TARGET_OLDABI) sorry ("hard-float MIPS16 code for ABIs other than o32 and o64"); diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index d8d219b..c2136e2 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -317,7 +317,8 @@ mmix_option_override (void) labels. */ if (flag_pic) { - warning (0, "-f%s not supported: ignored", (flag_pic > 1) ? "PIC" : "pic"); + warning (0, "%<-f%s%> not supported: ignored", + (flag_pic > 1) ? "PIC" : "pic"); flag_pic = 0; } } diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 72e1256..51116f5 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -104,7 +104,7 @@ mn10300_option_override (void) else if (strcasecmp (mn10300_tune_string, "am34") == 0) mn10300_tune_cpu = PROCESSOR_AM34; else - error ("-mtune= expects mn10300, am33, am33-2, or am34"); + error ("%<-mtune=%> expects mn10300, am33, am33-2, or am34"); } } diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 15d97af..48d16a4 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -797,26 +797,31 @@ msp430_option_override (void) if (msp430_warn_mcu) { if (target_cpu&& msp430x != xisa) - warning (0, "MCU '%s' supports %s ISA but -mcpu option is set to %s", + warning (0, "MCU '%s' supports %s ISA but %<-mcpu%> option " + "is set to %s", target_mcu, xisa ? "430X" : "430", msp430x ? "430X" : "430"); if (msp430_mcu_data[i].hwmpy == 0 && msp430_hwmult_type != MSP430_HWMULT_AUTO && msp430_hwmult_type != MSP430_HWMULT_NONE) - warning (0, "MCU '%s' does not have hardware multiply support, but -mhwmult is set to %s", + warning (0, "MCU '%s' does not have hardware multiply " + "support, but %<-mhwmult%> is set to %s", target_mcu, msp430_hwmult_type == MSP430_HWMULT_SMALL ? "16-bit" : msp430_hwmult_type == MSP430_HWMULT_LARGE ? "32-bit" : "f5series"); else if (msp430_hwmult_type == MSP430_HWMULT_SMALL && msp430_mcu_data[i].hwmpy != 1 && msp430_mcu_data[i].hwmpy != 2 ) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to 16-bit", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to 16-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_LARGE && msp430_mcu_data[i].hwmpy != 4) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to 32-bit", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to 32-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_F5SERIES && msp430_mcu_data[i].hwmpy != 8) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to f5series", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to f5series", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); } @@ -834,13 +839,13 @@ msp430_option_override (void) warning (0, "Unrecognized MCU name '%s', assuming that it is " "just a MSP430 with no hardware multiply.\n" - "Use the -mcpu and -mhwmult options to set " - "these explicitly.", + "Use the %<-mcpu%> and %<-mhwmult%> options to " + "set these explicitly.", target_mcu); else warning (0, "Unrecognized MCU name '%s', assuming that it " - "has no hardware multiply.\nUse the -mhwmult " + "has no hardware multiply.\nUse the %<-mhwmult%> " "option to set this explicitly.", target_mcu); } @@ -852,8 +857,8 @@ msp430_option_override (void) if (msp430_warn_mcu) warning (0, "Unrecognized MCU name '%s', assuming that it just " - "supports the MSP430 ISA.\nUse the -mcpu option to " - "set the ISA explicitly.", + "supports the MSP430 ISA.\nUse the %<-mcpu%> option " + "to set the ISA explicitly.", target_mcu); msp430x = false; @@ -868,12 +873,12 @@ msp430_option_override (void) msp430x = true; if (TARGET_LARGE && !msp430x) - error ("-mlarge requires a 430X-compatible -mmcu="); + error ("%<-mlarge%> requires a 430X-compatible %<-mmcu=%>"); if (msp430_code_region == MSP430_REGION_UPPER && ! msp430x) - error ("-mcode-region=upper requires 430X-compatible cpu"); + error ("%<-mcode-region=upper%> requires 430X-compatible cpu"); if (msp430_data_region == MSP430_REGION_UPPER && ! msp430x) - error ("-mdata-region=upper requires 430X-compatible cpu"); + error ("%<-mdata-region=upper%> requires 430X-compatible cpu"); if (flag_exceptions || flag_non_call_exceptions || flag_unwind_tables || flag_asynchronous_unwind_tables) diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 283e189..8bee154 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -4141,7 +4141,7 @@ nds32_option_override (void) target_flags &= ~MASK_EXT_STRING; if (flag_pic) - error ("not support -fpic option for v3m toolchain"); + error ("not support %<-fpic%> option for v3m toolchain"); } /* See if we are using reduced-set registers: diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 1114022..1f00b8a 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -1193,7 +1193,8 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_UNSAFE_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-funsafe-math-optimizations is specified", N2FPU_NAME (i)); + "%<-funsafe-math-optimizations%> is specified", + N2FPU_NAME (i)); /* Warn if the user is trying to use -mcustom-fmins et. al, that won't get used without -ffinite-math-only. See fold_builtin_fmin_fmax () @@ -1202,7 +1203,7 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_FINITE_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-ffinite-math-only is specified", N2FPU_NAME (i)); + "%<-ffinite-math-only%> is specified", N2FPU_NAME (i)); /* Warn if the user is trying to use a custom rounding instruction that won't get used without -fno-math-errno. See @@ -1211,12 +1212,12 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_NO_ERRNO_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-fno-math-errno is specified", N2FPU_NAME (i)); + "%<-fno-math-errno%> is specified", N2FPU_NAME (i)); if (errors || custom_code_conflict) fatal_error (input_location, - "conflicting use of -mcustom switches, target attributes, " - "and/or __builtin_custom_ functions"); + "conflicting use of %<-mcustom%> switches, target attributes, " + "and/or %<__builtin_custom_%> functions"); } static void @@ -1362,7 +1363,7 @@ nios2_option_override (void) sorry ("position-independent code requires the Linux ABI"); if (flag_pic && stack_limit_rtx && GET_CODE (stack_limit_rtx) == SYMBOL_REF) - sorry ("PIC support for -fstack-limit-symbol"); + sorry ("PIC support for %<-fstack-limit-symbol%>"); /* Function to allocate machine-dependent function status. */ init_machine_status = &nios2_init_machine_status; @@ -1384,11 +1385,11 @@ nios2_option_override (void) if (flag_pic) { if (nios2_gpopt_option != gpopt_none) - error ("-mgpopt not supported with PIC."); + error ("%<-mgpopt%> not supported with PIC."); if (nios2_gprel_sec) - error ("-mgprel-sec= not supported with PIC."); + error ("%<-mgprel-sec=%> not supported with PIC."); if (nios2_r0rel_sec) - error ("-mr0rel-sec= not supported with PIC."); + error ("%<-mr0rel-sec=%> not supported with PIC."); } /* Process -mgprel-sec= and -m0rel-sec=. */ @@ -1396,13 +1397,13 @@ nios2_option_override (void) { if (regcomp (&nios2_gprel_sec_regex, nios2_gprel_sec, REG_EXTENDED | REG_NOSUB)) - error ("-mgprel-sec= argument is not a valid regular expression."); + error ("%<-mgprel-sec=%> argument is not a valid regular expression."); } if (nios2_r0rel_sec) { if (regcomp (&nios2_r0rel_sec_regex, nios2_r0rel_sec, REG_EXTENDED | REG_NOSUB)) - error ("-mr0rel-sec= argument is not a valid regular expression."); + error ("%<-mr0rel-sec=%> argument is not a valid regular expression."); } /* If we don't have mul, we don't have mulx either! */ @@ -3699,7 +3700,7 @@ nios2_expand_custom_builtin (tree exp, unsigned int index, rtx target) { if (!custom_insn_opcode (value, VOIDmode)) error ("custom instruction opcode must be compile time " - "constant in the range 0-255 for __builtin_custom_%s", + "constant in the range 0-255 for %<__builtin_custom_%s%>", custom_builtin_name[index]); } else diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 1ab6b091..3770f72 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -488,7 +488,8 @@ main (int argc, char **argv) verbose = true; } if (!(fopenacc ^ fopenmp)) - fatal_error (input_location, "either -fopenacc or -fopenmp must be set"); + fatal_error (input_location, "either %<-fopenacc%> or %<-fopenmp%> " + "must be set"); struct obstack argv_obstack; obstack_init (&argv_obstack); diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 424b43a..a28099a 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -194,7 +194,7 @@ static void diagnose_openacc_conflict (bool optval, const char *optname) { if (flag_openacc && optval) - error ("option %s is not supported together with -fopenacc", optname); + error ("option %s is not supported together with %<-fopenacc%>", optname); } /* Implement TARGET_OPTION_OVERRIDE. */ diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 5b83031..532046c 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -453,7 +453,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; @@ -539,8 +539,8 @@ pa_option_override (void) if (! TARGET_GAS && write_symbols != NO_DEBUG) { - warning (0, "-g is only supported when using GAS on this processor,"); - warning (0, "-g option disabled"); + warning (0, "%<-g%> is only supported when using GAS on this processor,"); + warning (0, "%<-g%> option disabled"); write_symbols = NO_DEBUG; } @@ -554,8 +554,8 @@ pa_option_override (void) if (flag_reorder_blocks_and_partition) { inform (input_location, - "-freorder-blocks-and-partition does not work " - "on this architecture"); + "%<-freorder-blocks-and-partition%> does not work " + "on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index f8b608b..8881f80 100644 --- a/gcc/config/riscv/riscv.c +++ b/gcc/config/riscv/riscv.c @@ -329,7 +329,7 @@ riscv_parse_cpu (const char *cpu_string) if (strcmp (riscv_cpu_info_table[i].name, cpu_string) == 0) return riscv_cpu_info_table + i; - error ("unknown cpu %qs for -mtune", cpu_string); + error ("unknown cpu %qs for %<-mtune%>", cpu_string); return riscv_cpu_info_table; } @@ -4316,7 +4316,7 @@ riscv_option_override (void) if (TARGET_MUL && (target_flags_explicit & MASK_DIV) == 0) target_flags |= MASK_DIV; else if (!TARGET_MUL && TARGET_DIV) - error ("-mdiv requires -march to subsume the % extension"); + error ("%<-mdiv%> requires %<-march%> to subsume the % extension"); /* Likewise floating-point division and square root. */ if (TARGET_HARD_FLOAT && (target_flags_explicit & MASK_FDIV) == 0) @@ -4356,7 +4356,7 @@ riscv_option_override (void) /* Require that the ISA supports the requested floating-point ABI. */ if (UNITS_PER_FP_ARG > (TARGET_HARD_FLOAT ? UNITS_PER_FP_REG : 0)) - error ("requested ABI requires -march to subsume the %qc extension", + error ("requested ABI requires %<-march%> to subsume the %qc extension", UNITS_PER_FP_ARG > 8 ? 'Q' : (UNITS_PER_FP_ARG > 4 ? 'D' : 'F')); if (TARGET_RVE && riscv_abi != ABI_ILP32E) @@ -4364,7 +4364,7 @@ riscv_option_override (void) /* We do not yet support ILP32 on RV64. */ if (BITS_PER_WORD != POINTER_SIZE) - error ("ABI requires -march=rv%d", POINTER_SIZE); + error ("ABI requires %<-march=rv%d%>", POINTER_SIZE); /* Validate -mpreferred-stack-boundary= value. */ riscv_stack_boundary = ABI_STACK_BOUNDARY; @@ -4374,7 +4374,7 @@ riscv_option_override (void) int max = 8; if (!IN_RANGE (riscv_preferred_stack_boundary_arg, min, max)) - error ("-mpreferred-stack-boundary=%d must be between %d and %d", + error ("%<-mpreferred-stack-boundary=%d%> must be between %d and %d", riscv_preferred_stack_boundary_arg, min, max); riscv_stack_boundary = 8 << riscv_preferred_stack_boundary_arg; @@ -4387,8 +4387,8 @@ riscv_option_override (void) riscv_emit_attribute_p = 0; if (riscv_emit_attribute_p) - error ("-mriscv-attribute RISC-V ELF attribute requires GNU as 2.32" - " [-mriscv-attribute]"); + error ("%<-mriscv-attribute%> RISC-V ELF attribute requires GNU as 2.32" + " [%<-mriscv-attribute%>]"); #endif } diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index baf9b45..c127c50 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -372,7 +372,7 @@ rl78_option_override (void) /* Compiling with -flto results in a language of GNU GIMPLE being used... */ && strcmp (lang_hooks.name, "GNU GIMPLE")) /* Address spaces are currently only supported by C. */ - error ("-mes0 can only be used with C"); + error ("%<-mes0%> can only be used with C"); if (TARGET_SAVE_MDUC_REGISTERS && !(TARGET_G13 || RL78_MUL_G13)) warning (0, "mduc registers only saved for G13 target"); @@ -390,8 +390,10 @@ rl78_option_override (void) { case MUL_UNINIT: rl78_mul_type = MUL_NONE; break; case MUL_NONE: break; - case MUL_G13: error ("-mmul=g13 cannot be used with -mcpu=g10"); break; - case MUL_G14: error ("-mmul=g14 cannot be used with -mcpu=g10"); break; + case MUL_G13: error ("%<-mmul=g13%> cannot be used with " + "%<-mcpu=g10%>"); break; + case MUL_G14: error ("%<-mmul=g14%> cannot be used with " + "%<-mcpu=g10%>"); break; } break; @@ -402,7 +404,8 @@ rl78_option_override (void) case MUL_NONE: break; case MUL_G13: break; /* The S2 core does not have mul/div instructions. */ - case MUL_G14: error ("-mmul=g14 cannot be used with -mcpu=g13"); break; + case MUL_G14: error ("%<-mmul=g14%> cannot be used with " + "%<-mcpu=g13%>"); break; } break; @@ -414,7 +417,8 @@ rl78_option_override (void) case MUL_G14: break; /* The G14 core does not have the hardware multiply peripheral used by the G13 core, hence you cannot use G13 multipliy routines on G14 hardware. */ - case MUL_G13: error ("-mmul=g13 cannot be used with -mcpu=g14"); break; + case MUL_G13: error ("%<-mmul=g13%> cannot be used with " + "%<-mcpu=g14%>"); break; } break; } diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h index bdd9c6a..57ea9ec 100644 --- a/gcc/config/rs6000/aix61.h +++ b/gcc/config/rs6000/aix61.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index d4170c5..b30e719 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h index 9d79e72..9f02aea 100644 --- a/gcc/config/rs6000/aix72.h +++ b/gcc/config/rs6000/aix72.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/driver-rs6000.c b/gcc/config/rs6000/driver-rs6000.c index 9368a53..b290eea 100644 --- a/gcc/config/rs6000/driver-rs6000.c +++ b/gcc/config/rs6000/driver-rs6000.c @@ -265,7 +265,8 @@ elf_platform (void) candidates_list_and_hint (cpu, s, candidates); fatal_error ( input_location, - "Unsupported cpu name returned from kernel for -mcpu=native: %s\n" + "Unsupported cpu name returned from kernel for " + "%<-mcpu=native%>: %s\n" "Please use an explicit cpu name. Valid cpu names are: %s", cpu, s); } diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index d1f1d61..7e819d1 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -95,7 +95,7 @@ extern int dot_symbols; { \ rs6000_current_abi = ABI_ELFv2; \ if (dot_symbols) \ - error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ + error ("%<-mcall-aixdesc%> incompatible with %<-mabi=elfv2%>"); \ } \ if (rs6000_isa_flags & OPTION_MASK_EABI) \ { \ @@ -110,14 +110,14 @@ extern int dot_symbols; if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index df1d8a9..5380f6a 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -112,7 +112,7 @@ extern int dot_symbols; { \ rs6000_current_abi = ABI_ELFv2; \ if (dot_symbols) \ - error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ + error ("%<-mcall-aixdesc%> incompatible with %<-mabi=elfv2%>"); \ } \ if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \ { \ @@ -132,14 +132,14 @@ extern int dot_symbols; if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel incompatible with other toc options%>"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d72a51a..a21f4f7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3992,7 +3992,7 @@ rs6000_option_override_internal (bool global_init_p) if (!TARGET_HARD_FLOAT) { if (rs6000_isa_flags_explicit & OPTION_MASK_VSX) - msg = N_("-mvsx requires hardware floating point"); + msg = N_("%<-mvsx%> requires hardware floating point"); else { rs6000_isa_flags &= ~ OPTION_MASK_VSX; @@ -4000,14 +4000,14 @@ rs6000_option_override_internal (bool global_init_p) } } else if (TARGET_AVOID_XFORM > 0) - msg = N_("-mvsx needs indexed addressing"); + msg = N_("%<-mvsx%> needs indexed addressing"); else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC)) { if (rs6000_isa_flags_explicit & OPTION_MASK_VSX) - msg = N_("-mvsx and -mno-altivec are incompatible"); + msg = N_("%<-mvsx%> and %<-mno-altivec%> are incompatible"); else - msg = N_("-mno-altivec disables vsx"); + msg = N_("%<-mno-altivec%> disables vsx"); } if (msg) @@ -4133,10 +4133,10 @@ rs6000_option_override_internal (bool global_init_p) if ((TARGET_QUAD_MEMORY || TARGET_QUAD_MEMORY_ATOMIC) && !TARGET_POWERPC64) { if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0) - warning (0, N_("-mquad-memory requires 64-bit mode")); + warning (0, N_("%<-mquad-memory%> requires 64-bit mode")); if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY_ATOMIC) != 0) - warning (0, N_("-mquad-memory-atomic requires 64-bit mode")); + warning (0, N_("%<-mquad-memory-atomic%> requires 64-bit mode")); rs6000_isa_flags &= ~(OPTION_MASK_QUAD_MEMORY | OPTION_MASK_QUAD_MEMORY_ATOMIC); @@ -4148,7 +4148,7 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_QUAD_MEMORY && !WORDS_BIG_ENDIAN) { if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0) - warning (0, N_("-mquad-memory is not available in little endian " + warning (0, N_("%<-mquad-memory%> is not available in little endian " "mode")); rs6000_isa_flags &= ~OPTION_MASK_QUAD_MEMORY; @@ -4338,7 +4338,7 @@ rs6000_option_override_internal (bool global_init_p) if (!TARGET_VSX) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_KEYWORD) != 0) - error ("%qs requires VSX support", "-mfloat128"); + error ("%qs requires VSX support", "%<-mfloat128%>"); TARGET_FLOAT128_TYPE = 0; rs6000_isa_flags &= ~(OPTION_MASK_FLOAT128_KEYWORD @@ -4347,7 +4347,7 @@ rs6000_option_override_internal (bool global_init_p) else if (!TARGET_FLOAT128_TYPE) { TARGET_FLOAT128_TYPE = 1; - warning (0, "The -mfloat128 option may not be fully supported"); + warning (0, "The %<-mfloat128%> option may not be fully supported"); } } @@ -4370,7 +4370,7 @@ rs6000_option_override_internal (bool global_init_p) && (rs6000_isa_flags & ISA_3_0_MASKS_IEEE) != ISA_3_0_MASKS_IEEE) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0) - error ("%qs requires full ISA 3.0 support", "-mfloat128-hardware"); + error ("%qs requires full ISA 3.0 support", "%<-mfloat128-hardware%>"); rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; } @@ -4378,7 +4378,7 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_FLOAT128_HW && !TARGET_64BIT) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0) - error ("%qs requires %qs", "-mfloat128-hardware", "-m64"); + error ("%qs requires %qs", "%<-mfloat128-hardware%>", "-m64"); rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; } @@ -13346,7 +13346,7 @@ rs6000_expand_zeroop_builtin (enum insn_code icode, rtx target) if (icode == CODE_FOR_rs6000_mffsl && rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_mffsl() not supported with -msoft-float"); + error ("%<__builtin_mffsl%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -13418,7 +13418,8 @@ rs6000_expand_mtfsb_builtin (enum insn_code icode, tree exp) if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_mtfsb0 and __builtin_mtfsb1 not supported with -msoft-float"); + error ("%<__builtin_mtfsb0%> and %<__builtin_mtfsb1%> not supported with " + "%<-msoft-float%>"); return const0_rtx; } @@ -13455,7 +13456,7 @@ rs6000_expand_set_fpscr_rn_builtin (enum insn_code icode, tree exp) if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_set_fpscr_rn not supported with -msoft-float"); + error ("%<__builtin_set_fpscr_rn%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -13495,11 +13496,12 @@ rs6000_expand_set_fpscr_drn_builtin (enum insn_code icode, tree exp) if (TARGET_32BIT) /* Builtin not supported in 32-bit mode. */ fatal_error (input_location, - "__builtin_set_fpscr_drn is not supported in 32-bit mode."); + "%<__builtin_set_fpscr_drn%> is not supported " + "in 32-bit mode."); if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_set_fpscr_drn not supported with -msoft-float"); + error ("%<__builtin_set_fpscr_drn%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -15236,7 +15238,8 @@ rs6000_invalid_builtin (enum rs6000_builtins fncode) error ("builtin function %qs requires ISA 3.0 IEEE 128-bit floating point", name); else if ((fnmask & RS6000_BTM_FLOAT128) != 0) - error ("builtin function %qs requires the %qs option", name, "-mfloat128"); + error ("builtin function %qs requires the %qs option", name, + "%<-mfloat128%>"); else if ((fnmask & (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64)) == (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64)) error ("builtin function %qs requires the %qs (or newer), and " @@ -29320,7 +29323,7 @@ rs6000_expand_split_stack_prologue (void) if (global_regs[29]) { - error ("%qs uses register r29", "-fsplit-stack"); + error ("%qs uses register r29", "%<-fsplit-stack%>"); inform (DECL_SOURCE_LOCATION (global_regs_decl[29]), "conflicts with %qD", global_regs_decl[29]); } @@ -29328,7 +29331,8 @@ rs6000_expand_split_stack_prologue (void) allocate = info->total_size; if (allocate > (unsigned HOST_WIDE_INT) 1 << 31) { - sorry ("Stack frame larger than 2G is not supported for -fsplit-stack"); + sorry ("Stack frame larger than 2G is not supported for " + "%<-fsplit-stack%>"); return; } if (morestack_ref == NULL_RTX) diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h index f143781..401077d 100644 --- a/gcc/config/rs6000/rtems.h +++ b/gcc/config/rs6000/rtems.h @@ -111,14 +111,14 @@ if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 5f422ed..dac05db 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -2593,9 +2593,9 @@ valid_psw_flag (rtx op, const char *which) return 1; } - error ("__builtin_rx_%s takes 'C', 'Z', 'S', 'O', 'I', or 'U'", which); + error ("%<__builtin_rx_%s%> takes 'C', 'Z', 'S', 'O', 'I', or 'U'", which); if (!mvtc_inform_done) - error ("use __builtin_rx_mvtc (0, ... ) to write arbitrary values to PSW"); + error ("use %<__builtin_rx_mvtc%> (0, ... ) to write arbitrary values to PSW"); mvtc_inform_done = 1; return 0; @@ -2642,7 +2642,8 @@ rx_expand_builtin (tree exp, if (rx_allow_string_insns) emit_insn (gen_rmpa ()); else - error ("-mno-allow-string-insns forbids the generation of the RMPA instruction"); + error ("%<-mno-allow-string-insns%> forbids the generation " + "of the RMPA instruction"); return NULL_RTX; case RX_BUILTIN_MVFC: return rx_expand_builtin_mvfc (arg, target); case RX_BUILTIN_MVTC: return rx_expand_builtin_mvtc (exp); diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c index d2fb7ba..aafe346e 100644 --- a/gcc/config/s390/s390-c.c +++ b/gcc/config/s390/s390-c.c @@ -889,7 +889,7 @@ s390_resolve_overloaded_builtin (location_t loc, if (!TARGET_VX && (ob_flags & B_VX)) { - error_at (loc, "%qF requires -mvx", ob_fndecl); + error_at (loc, "%qF requires %<-mvx%>", ob_fndecl); return error_mark_node; } diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index b80d5e8..23255ef 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -799,14 +799,14 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, bflags = bflags_for_builtin (fcode); if ((bflags & B_HTM) && !TARGET_HTM) { - error ("builtin %qF is not supported without -mhtm " - "(default with -march=zEC12 and higher).", fndecl); + error ("builtin %qF is not supported without %<-mhtm%> " + "(default with %<-march=zEC12%> and higher).", fndecl); return const0_rtx; } if (((bflags & B_VX) || (bflags & B_VXE)) && !TARGET_VX) { - error ("builtin %qF requires -mvx " - "(default with -march=z13 and higher).", fndecl); + error ("builtin %qF requires %<-mvx%> " + "(default with %<-march=z13%> and higher).", fndecl); return const0_rtx; } @@ -12656,7 +12656,7 @@ s390_function_profiler (FILE *file, int labelno) output_asm_nops ("-mnop-mcount", /* brasl */ 3); else if (cfun->static_chain_decl) warning (OPT_Wcannot_profile, "nested functions cannot be profiled " - "with -mfentry on s390"); + "with %<-mfentry%> on s390"); else output_asm_insn ("brasl\t0,%4", op); } @@ -14829,7 +14829,7 @@ s390_option_override_internal (struct gcc_options *opts, || opts->x_s390_function_return == indirect_branch_thunk_inline || opts->x_s390_function_return_reg == indirect_branch_thunk_inline || opts->x_s390_function_return_mem == indirect_branch_thunk_inline) - error ("thunk-inline is only supported with -mindirect-branch-jump"); + error ("thunk-inline is only supported with %<-mindirect-branch-jump%>"); if (opts->x_s390_indirect_branch != indirect_branch_keep) { @@ -14867,7 +14867,8 @@ s390_option_override_internal (struct gcc_options *opts, error ("hardware vector support not available on %s", processor_table[(int)opts->x_s390_arch].name); if (TARGET_SOFT_FLOAT_P (opts->x_target_flags)) - error ("hardware vector support not available with -msoft-float"); + error ("hardware vector support not available with " + "%<-msoft-float%>"); } } else @@ -14911,7 +14912,8 @@ s390_option_override_internal (struct gcc_options *opts, { if (TARGET_HARD_DFP_P (opts_set->x_target_flags) && TARGET_HARD_DFP_P (opts->x_target_flags)) - error ("-mhard-dfp can%'t be used in conjunction with -msoft-float"); + error ("%<-mhard-dfp%> can%'t be used in conjunction with " + "%<-msoft-float%>"); opts->x_target_flags &= ~MASK_HARD_DFP; } @@ -14919,8 +14921,8 @@ s390_option_override_internal (struct gcc_options *opts, if (TARGET_BACKCHAIN_P (opts->x_target_flags) && TARGET_PACKED_STACK_P (opts->x_target_flags) && TARGET_HARD_FLOAT_P (opts->x_target_flags)) - error ("-mbackchain -mpacked-stack -mhard-float are not supported " - "in combination"); + error ("%<-mbackchain%> %<-mpacked-stack%> %<-mhard-float%> are not " + "supported in combination"); if (opts->x_s390_stack_size) { @@ -14930,7 +14932,7 @@ s390_option_override_internal (struct gcc_options *opts, error ("stack size must not be greater than 64k"); } else if (opts->x_s390_stack_guard) - error ("-mstack-guard implies use of -mstack-size"); + error ("%<-mstack-guard%> implies use of %<-mstack-size%>"); /* Our implementation of the stack probe requires the probe interval to be used as displacement in an address operand. The maximum @@ -15007,7 +15009,7 @@ s390_option_override_internal (struct gcc_options *opts, because 31-bit PLT stubs assume that %r12 contains GOT address, which is not the case when the code runs before the prolog. */ if (opts->x_flag_fentry && !TARGET_64BIT) - error ("-mfentry is supported only for 64-bit CPUs"); + error ("%<-mfentry%> is supported only for 64-bit CPUs"); } static void @@ -15080,7 +15082,8 @@ s390_option_override (void) flag_prefetch_loop_arrays = 1; if (!s390_pic_data_is_text_relative && !flag_pic) - error ("-mno-pic-data-is-text-relative cannot be used without -fpic/-fPIC"); + error ("%<-mno-pic-data-is-text-relative%> cannot be used without " + "%<-fpic%>/%<-fPIC%>"); if (TARGET_TPF) { diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index fcb7cff..8dc79a7 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -933,7 +933,7 @@ sh_option_override (void) else if (flag_exceptions) { if (flag_schedule_insns && global_options_set.x_flag_schedule_insns) - warning (0, "ignoring -fschedule-insns because of exception " + warning (0, "ignoring %<-fschedule-insns%> because of exception " "handling bug"); flag_schedule_insns = 0; } @@ -951,7 +951,7 @@ sh_option_override (void) && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS) { warning (0, "unwind tables currently require either a frame pointer " - "or -maccumulate-outgoing-args for correctness"); + "or %<-maccumulate-outgoing-args%> for correctness"); TARGET_ACCUMULATE_OUTGOING_ARGS = 1; } @@ -7413,7 +7413,7 @@ sh_builtin_saveregs (void) if (!TARGET_FPU_ANY) { - error ("__builtin_saveregs not supported by this subtarget"); + error ("%<__builtin_saveregs%> not supported by this subtarget"); return const0_rtx; } @@ -8279,7 +8279,7 @@ sh_fix_range (const char *const_str) char* dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/sh/vxworks.h b/gcc/config/sh/vxworks.h index 342c639..1ea24e0 100644 --- a/gcc/config/sh/vxworks.h +++ b/gcc/config/sh/vxworks.h @@ -40,7 +40,7 @@ along with GCC; see the file COPYING3. If not see appear in shared libraries, so relaxation is OK \ for RTP PIC. */ \ if (TARGET_RELAX && !(TARGET_VXWORKS_RTP && flag_pic)) \ - error ("-mrelax is only supported for RTP PIC"); \ + error ("%<-mrelax%> is only supported for RTP PIC"); \ } \ while (0) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 7991bc2..93479ab 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1740,7 +1740,7 @@ sparc_option_override (void) else if (! strcmp (q, "options")) mask = MASK_DEBUG_OPTIONS; else - error ("unknown -mdebug-%s switch", q); + error ("unknown %<-mdebug-%s%> switch", q); if (invert) sparc_debug &= ~mask; @@ -1774,7 +1774,7 @@ sparc_option_override (void) /* We force all 64bit archs to use 128 bit long double */ if (TARGET_ARCH64 && !TARGET_LONG_DOUBLE_128) { - error ("-mlong-double-64 not allowed with -m64"); + error ("%<-mlong-double-64%> not allowed with %<-m64%>"); target_flags |= MASK_LONG_DOUBLE_128; } @@ -1782,7 +1782,7 @@ sparc_option_override (void) for (i = 8; i < 16; i++) if (!call_used_regs [i]) { - error ("-fcall-saved-REG is not supported for out registers"); + error ("%<-fcall-saved-REG%> is not supported for out registers"); call_used_regs [i] = 1; } @@ -1906,7 +1906,7 @@ sparc_option_override (void) if (global_options_set.x_sparc_code_model) { if (TARGET_ARCH32) - error ("-mcmodel= is not supported in 32-bit mode"); + error ("%<-mcmodel=%> is not supported in 32-bit mode"); } else { diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 8158584..8d7439e 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -259,7 +259,7 @@ spu_option_override (void) else if (strcmp (&spu_arch_string[0], "celledp") == 0) spu_arch = PROCESSOR_CELLEDP; else - error ("bad value (%s) for -march= switch", spu_arch_string); + error ("bad value (%s) for %<-march=%> switch", spu_arch_string); } /* Determine processor to tune for. */ @@ -270,7 +270,7 @@ spu_option_override (void) else if (strcmp (&spu_tune_string[0], "celledp") == 0) spu_tune = PROCESSOR_CELLEDP; else - error ("bad value (%s) for -mtune= switch", spu_tune_string); + error ("bad value (%s) for %<-mtune=%> switch", spu_tune_string); } /* Change defaults according to the processor architecture. */ @@ -4917,7 +4917,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 67bc2d6..431f64c 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -419,9 +419,9 @@ static void visium_option_override (void) { if (flag_pic == 1) - warning (OPT_fpic, "-fpic is not supported"); + warning (OPT_fpic, "%<-fpic%> is not supported"); if (flag_pic == 2) - warning (OPT_fPIC, "-fPIC is not supported"); + warning (OPT_fPIC, "%<-fPIC%> is not supported"); /* MCM is the default in the GR5/GR6 era. */ target_flags |= MASK_MCM; @@ -728,7 +728,7 @@ visium_handle_interrupt_attr (tree *node, tree name, } else if (!TARGET_SV_MODE) { - error ("an interrupt handler cannot be compiled with -muser-mode"); + error ("an interrupt handler cannot be compiled with %<-muser-mode%>"); *no_add_attrs = true; } diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index f766764..19bd616 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -2256,7 +2256,7 @@ xtensa_option_override (void) /* Check PIC settings. PIC is only supported when using L32R instructions, and some targets need to always use PIC. */ if (flag_pic && TARGET_CONST16) - error ("-f%s is not supported with CONST16 instructions", + error ("%<-f%s%> is not supported with CONST16 instructions", (flag_pic > 1 ? "PIC" : "pic")); else if (TARGET_FORCE_NO_PIC) flag_pic = 0; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2d58add..fd98347 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,53 @@ +2019-03-11 Martin Liska + + * 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-08 Jakub Jelinek PR other/80058 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c50d9c8..98aa5ee 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -7499,7 +7499,7 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain) && TYPE_MODE (TREE_TYPE (prom)) != TYPE_MODE (arg_type) && (complain & tf_warning)) warning_at (loc, OPT_Wabi, "scoped enum %qT passed through ... as " - "%qT before -fabi-version=6, %qT after", arg_type, + "%qT before %<-fabi-version=6%>, %qT after", arg_type, TREE_TYPE (prom), ENUM_UNDERLYING_TYPE (arg_type)); if (!abi_version_at_least (6)) arg = prom; @@ -8335,7 +8335,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) pedwarn (DECL_SOURCE_LOCATION (cand->fn), 0, " in call to %qD", cand->fn); pedwarn (input_location, 0, - " (you can disable this with -fno-deduce-init-list)"); + " (you can disable this with " + "%<-fno-deduce-init-list%>)"); } } diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a70a852..712169c 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3330,7 +3330,7 @@ check_field_decl (tree field, if (!warned && errorcount > oldcount) { inform (DECL_SOURCE_LOCATION (field), "unrestricted unions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); warned = true; } } @@ -4143,11 +4143,12 @@ layout_nonempty_base_or_field (record_layout_info rli, { if (abi_version_at_least (9)) warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wabi, - "alignment of %qD increased in -fabi-version=9 " + "alignment of %qD increased in %<-fabi-version=9%> " "(GCC 5.2)", decl); else warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wabi, "alignment " - "of %qD will increase in -fabi-version=9", decl); + "of %qD will increase in %<-fabi-version=9%>", + decl); } break; } diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 783d1fc..b2b575d 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4243,7 +4243,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, if (!ctx->quiet) error_at (cp_expr_loc_or_loc (t, input_location), "% loop iteration count exceeds limit of %d " - "(use -fconstexpr-loop-limit= to increase the limit)", + "(use %<-fconstexpr-loop-limit=%> to increase the limit)", constexpr_loop_limit); *non_constant_p = true; break; diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 82a44f3..c10db92 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -1923,7 +1923,7 @@ type_promotes_to (tree type) if (abi_version_crosses (6) && TYPE_MODE (prom) != TYPE_MODE (type)) warning (OPT_Wabi, "scoped enum %qT passed through ... as " - "%qT before -fabi-version=6, %qT after", + "%qT before %<-fabi-version=6%>, %qT after", type, prom, ENUM_UNDERLYING_TYPE (type)); if (!abi_version_at_least (6)) type = prom; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 081f37c..89edfe8 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4267,7 +4267,8 @@ cxx_init_decl_processing (void) if (aligned_new_threshold > 1 && !pow2p_hwi (aligned_new_threshold)) { - error ("-faligned-new=%d is not a power of two", aligned_new_threshold); + error ("%<-faligned-new=%d%> is not a power of two", + aligned_new_threshold); aligned_new_threshold = 1; } if (aligned_new_threshold == -1) @@ -10170,7 +10171,7 @@ mark_inline_variable (tree decl, location_t loc) } else if (cxx_dialect < cxx17) pedwarn (loc, 0, "inline variables are only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); if (inlinep) { retrofit_lang_decl (decl); @@ -10963,8 +10964,8 @@ grokdeclarator (const cp_declarator *declarator, gcc_rich_location richloc (declspecs->locations[ds_virtual]); richloc.add_range (declspecs->locations[ds_constexpr]); pedwarn (&richloc, OPT_Wpedantic, "member %qD can be declared both " - "% and % only in -std=c++2a or " - "-std=gnu++2a", dname); + "% and % only in %<-std=c++2a%> or " + "%<-std=gnu++2a%>", dname); } } friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend); @@ -11331,7 +11332,7 @@ grokdeclarator (const cp_declarator *declarator, "trailing return type", name); inform (typespec_loc, "deduced return type only available " - "with -std=c++14 or -std=gnu++14"); + "with %<-std=c++14%> or %<-std=gnu++14%>"); } else if (virtualp) { @@ -11402,7 +11403,7 @@ grokdeclarator (const cp_declarator *declarator, always be an error. */ error_at (typespec_loc, "trailing return type only available " - "with -std=c++11 or -std=gnu++11"); + "with %<-std=c++11%> or %<-std=gnu++11%>"); else error_at (typespec_loc, "%qs function with trailing " "return type not declared with % " diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4e4746e..f8637da 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4608,7 +4608,7 @@ record_mangling (tree decl, bool need_warning) inform (DECL_SOURCE_LOCATION (*slot), "previous mangling %q#D", *slot); inform (DECL_SOURCE_LOCATION (decl), - "a later -fabi-version= (or =0)" + "a later %<-fabi-version=%> (or =0)" " avoids this error with a change in mangling"); *slot = decl; } diff --git a/gcc/cp/error.c b/gcc/cp/error.c index dd3a339..4a0aed2 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -4148,75 +4148,77 @@ maybe_warn_cpp0x (cpp0x_warn_str str) case CPP0X_INITIALIZER_LISTS: pedwarn (input_location, 0, "extended initializer lists " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_EXPLICIT_CONVERSION: pedwarn (input_location, 0, "explicit conversion operators " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_VARIADIC_TEMPLATES: pedwarn (input_location, 0, "variadic templates " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_LAMBDA_EXPR: pedwarn (input_location, 0, "lambda expressions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_AUTO: pedwarn (input_location, 0, - "C++11 auto only available with -std=c++11 or -std=gnu++11"); + "C++11 auto only available with %<-std=c++11%> or " + "%<-std=gnu++11%>"); break; case CPP0X_SCOPED_ENUMS: pedwarn (input_location, 0, - "scoped enums only available with -std=c++11 or -std=gnu++11"); + "scoped enums only available with %<-std=c++11%> or " + "%<-std=gnu++11%>"); break; case CPP0X_DEFAULTED_DELETED: pedwarn (input_location, 0, "defaulted and deleted functions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_INLINE_NAMESPACES: pedwarn (input_location, OPT_Wpedantic, "inline namespaces " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_OVERRIDE_CONTROLS: pedwarn (input_location, 0, "override controls (override/final) " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_NSDMI: pedwarn (input_location, 0, "non-static data member initializers " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_USER_DEFINED_LITERALS: pedwarn (input_location, 0, "user-defined literals " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_DELEGATING_CTORS: pedwarn (input_location, 0, "delegating constructors " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_INHERITING_CTORS: pedwarn (input_location, 0, "inheriting constructors " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_ATTRIBUTES: pedwarn (input_location, 0, "c++11 attributes " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_REF_QUALIFIER: pedwarn (input_location, 0, "ref-qualifiers " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; default: gcc_unreachable (); diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 139e871..40e973f 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -415,7 +415,7 @@ doing_eh (void) static int warned = 0; if (! warned) { - error ("exception handling disabled, use -fexceptions to enable"); + error ("exception handling disabled, use %<-fexceptions%> to enable"); warned = 1; } return 0; diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 777c477..f40c3e1 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -4155,18 +4155,18 @@ maybe_check_abi_tags (tree t, tree for_decl, int ver) if (for_decl && DECL_THUNK_P (for_decl)) warning_at (DECL_SOURCE_LOCATION (t), OPT_Wabi, "the mangled name of a thunk for %qD changes between " - "-fabi-version=%d and -fabi-version=%d", + "%<-fabi-version=%d%> and %<-fabi-version=%d%>", t, flag_abi_version, warn_abi_version); else if (for_decl) warning_at (DECL_SOURCE_LOCATION (for_decl), OPT_Wabi, "the mangled name of %qD changes between " - "-fabi-version=%d and -fabi-version=%d", + "%<-fabi-version=%d%> and %<-fabi-version=%d%>", for_decl, flag_abi_version, warn_abi_version); else warning_at (DECL_SOURCE_LOCATION (t), OPT_Wabi, "the mangled name of the initialization guard variable " - "for %qD changes between -fabi-version=%d and " - "-fabi-version=%d", + "for %qD changes between %<-fabi-version=%d%> and " + "%<-fabi-version=%d%>", t, flag_abi_version, warn_abi_version); } } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index de2dd30..f951111 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3288,7 +3288,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, decl); if (DECL_CLASS_TEMPLATE_P (decl) && cxx_dialect < cxx17) inform (location, "class template argument deduction is only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); inform (DECL_SOURCE_LOCATION (decl), "%qD declared here", decl); } else if (TREE_CODE (id) == BIT_NOT_EXPR) @@ -3322,17 +3322,17 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, The user should have said "typename A::X". */ if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_CONSTEXPR]) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_NOEXCEPT]) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (cxx_dialect < cxx11 && TREE_CODE (id) == IDENTIFIER_NODE && id_equal (id, "thread_local")) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (!flag_concepts && id == ridpointers[(int)RID_CONCEPT]) - inform (location, "% only available with -fconcepts"); + inform (location, "% only available with %<-fconcepts%>"); else if (processing_template_decl && current_class_type && TYPE_BINFO (current_class_type)) { @@ -4551,7 +4551,7 @@ cp_parser_userdef_numeric_literal (cp_parser *parser) "GNU built-in suffix"); } else if (!ext) - inform (token->location, "use -fext-numeric-literals " + inform (token->location, "use %<-fext-numeric-literals%> " "to enable more built-in suffixes"); if (kind == DK_ERROR) @@ -5331,7 +5331,7 @@ cp_parser_primary_expression (cp_parser *parser, && cxx_dialect < cxx17 && !in_system_header_at (input_location)) pedwarn (input_location, 0, "fold-expressions only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); } else /* Let the front end know that this expression was @@ -6069,7 +6069,7 @@ cp_parser_unqualified_id (cp_parser* parser, if (cxx_dialect < cxx14) pedwarn (loc, 0, "%<~auto%> only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); cp_lexer_consume_token (parser->lexer); return cp_expr (build_nt (BIT_NOT_EXPR, make_auto (), loc)); } @@ -8003,7 +8003,7 @@ cp_parser_pseudo_destructor_name (cp_parser* parser, if (cxx_dialect < cxx14) pedwarn (input_location, 0, "%<~auto%> only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); *scope = NULL_TREE; @@ -10100,7 +10100,7 @@ cp_parser_builtin_offsetof (cp_parser *parser) { const char *saved_message = parser->type_definition_forbidden_message; parser->type_definition_forbidden_message - = G_("types may not be defined within __builtin_offsetof"); + = G_("types may not be defined within %<__builtin_offsetof%>"); type = cp_parser_type_id (parser); parser->type_definition_forbidden_message = saved_message; } @@ -10390,7 +10390,7 @@ cp_parser_lambda_expression (cp_parser* parser) { error_at (LAMBDA_EXPR_LOCATION (lambda_expr), "lambda-expression in unevaluated context" - " only available with -std=c++2a or -std=gnu++2a"); + " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); token->error_reported = true; } ok = false; @@ -10400,7 +10400,7 @@ cp_parser_lambda_expression (cp_parser* parser) if (!token->error_reported) { error_at (token->location, "lambda-expression in template-argument" - " only available with -std=c++2a or -std=gnu++2a"); + " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); token->error_reported = true; } ok = false; @@ -10597,7 +10597,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) location_t loc = cp_lexer_peek_token (parser->lexer)->location; if (cxx_dialect < cxx17) pedwarn (loc, 0, "%<*this%> capture only available with " - "-std=c++17 or -std=gnu++17"); + "%<-std=c++17%> or %<-std=gnu++17%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); add_capture (lambda_expr, @@ -10614,7 +10614,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) location_t loc = cp_lexer_peek_token (parser->lexer)->location; if (cxx_dialect < cxx2a) pedwarn (loc, 0, "pack init-capture only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); init_pack_expansion = true; } @@ -10653,7 +10653,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cxx_dialect < cxx14) pedwarn (input_location, 0, "lambda capture initializers " - "only available with -std=c++14 or -std=gnu++14"); + "only available with %<-std=c++14%> or %<-std=gnu++14%>"); capture_init_expr = cp_parser_initializer (parser, &direct, &non_constant, true); explicit_init_p = true; @@ -10791,11 +10791,11 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) if (cxx_dialect < cxx14) pedwarn (parser->lexer->next_token->location, 0, "lambda templates are only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); else if (cxx_dialect < cxx2a) pedwarn (parser->lexer->next_token->location, OPT_Wpedantic, "lambda templates are only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); @@ -10890,7 +10890,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) = lambda_specs.locations[ds_constexpr]; else error_at (lambda_specs.locations[ds_constexpr], "% " - "lambda only available with -std=c++17 or -std=gnu++17"); + "lambda only available with %<-std=c++17%> or " + "%<-std=gnu++17%>"); } p = obstack_alloc (&declarator_obstack, 0); @@ -11714,7 +11715,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, cp_token *tok = cp_lexer_consume_token (parser->lexer); if (cxx_dialect < cxx17 && !in_system_header_at (tok->location)) pedwarn (tok->location, 0, "% only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); } /* Look for the `('. */ @@ -11741,7 +11742,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, if (cxx_dialect < cxx17) pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "init-statement in selection statements only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); cp_parser_init_statement (parser, &decl); } @@ -12728,7 +12729,7 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) { pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based % loops with initializer only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); *decl = error_mark_node; } } @@ -12752,7 +12753,7 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) if (cxx_dialect < cxx11) pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based % loops only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); } else /* The ';' is not consumed yet because we told @@ -13694,7 +13695,7 @@ cp_parser_decomposition_declaration (cp_parser *parser, if (cxx_dialect < cxx17) pedwarn (loc, 0, "structured bindings only available with " - "-std=c++17 or -std=gnu++17"); + "%<-std=c++17%> or %<-std=gnu++17%>"); tree pushed_scope; cp_declarator *declarator = make_declarator (cdk_decomp); @@ -14231,8 +14232,8 @@ cp_parser_function_specifier_opt (cp_parser* parser, if (cxx_dialect < cxx2a) pedwarn (token->location, 0, - "% only available with -std=c++2a " - "or -std=gnu++2a"); + "% only available with %<-std=c++2a%> " + "or %<-std=gnu++2a%>"); /* Parse the constant-expression. */ expr = cp_parser_constant_expression (parser); @@ -14400,7 +14401,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) if (cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, "static_assert without a message " - "only available with -std=c++17 or -std=gnu++17"); + "only available with %<-std=c++17%> or %<-std=gnu++17%>"); /* Eat the ')' */ cp_lexer_consume_token (parser->lexer); message = build_string (1, ""); @@ -17642,17 +17643,17 @@ cp_parser_simple_type_specifier (cp_parser* parser, error_at (token->location, "use of % in lambda parameter declaration " "only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); } else if (cxx_dialect < cxx14) error_at (token->location, "use of % in parameter declaration " "only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); else if (!flag_concepts) pedwarn (token->location, 0, "use of % in parameter declaration " - "only available with -fconcepts"); + "only available with %<-fconcepts%>"); } else type = make_auto (); @@ -19178,7 +19179,7 @@ cp_parser_namespace_definition (cp_parser* parser) if (cxx_dialect < cxx2a) pedwarn (cp_lexer_peek_token (parser->lexer)->location, OPT_Wpedantic, "nested inline namespace definitions only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); } @@ -19207,8 +19208,8 @@ cp_parser_namespace_definition (cp_parser* parser) if (!nested_definition_count && cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, - "nested namespace definitions only available with " - "-std=c++17 or -std=gnu++17"); + "nested namespace definitions only available with " + "%<-std=c++17%> or %<-std=gnu++17%>"); /* Nested namespace names can create new namespaces (unlike other qualified-ids). */ @@ -19444,7 +19445,7 @@ cp_parser_using_declaration (cp_parser* parser, && !in_system_header_at (ell->location)) pedwarn (ell->location, 0, "pack expansion in using-declaration only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); qscope = make_pack_expansion (qscope); } @@ -19506,7 +19507,7 @@ cp_parser_using_declaration (cp_parser* parser, if (cxx_dialect < cxx17) pedwarn (comma->location, 0, "comma-separated list in using-declaration only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); goto again; } @@ -22618,11 +22619,11 @@ cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser, if (DECL_CONSTRUCTOR_P (current_function_decl)) pedwarn (input_location, 0, "function-try-block body of % constructor only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); else pedwarn (input_location, 0, "function-try-block body of % function only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); } /* Begin the function body. */ @@ -22943,7 +22944,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, if (cxx_dialect < cxx2a) pedwarn (loc, OPT_Wpedantic, "C++ designated initializers only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); /* Consume the `.'. */ cp_lexer_consume_token (parser->lexer); /* Consume the identifier. */ @@ -24160,7 +24161,7 @@ cp_parser_type_parameter_key (cp_parser* parser) by the standard until C++17. */ pedwarn (token->location, OPT_Wpedantic, "ISO C++ forbids typename key in template template parameter;" - " use -std=c++17 or -std=gnu++17"); + " use %<-std=c++17%> or %<-std=gnu++17%>"); } else cp_parser_error (parser, "expected % or %"); @@ -24546,8 +24547,8 @@ cp_parser_member_declaration (cp_parser* parser) && identifier != NULL_TREE) pedwarn (loc, 0, "default member initializers for bit-fields " - "only available with -std=c++2a or " - "-std=gnu++2a"); + "only available with %<-std=c++2a%> or " + "%<-std=gnu++2a%>"); initializer = cp_parser_save_nsdmi (parser); if (identifier == NULL_TREE) @@ -25371,7 +25372,7 @@ cp_parser_try_block (cp_parser* parser) && cxx_dialect < cxx2a) pedwarn (input_location, 0, "% in % function only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); try_block = begin_try_block (); cp_parser_compound_statement (parser, NULL, BCS_TRY_BLOCK, false); @@ -26250,7 +26251,7 @@ cp_parser_std_attribute_spec (cp_parser *parser) && !in_system_header_at (input_location)) pedwarn (input_location, 0, "attribute using prefix only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); @@ -26573,7 +26574,7 @@ cp_parser_requires_clause_opt (cp_parser *parser) && tok->u.value == ridpointers[RID_REQUIRES]) { error_at (cp_lexer_peek_token (parser->lexer)->location, - "% only available with -fconcepts"); + "% only available with %<-fconcepts%>"); /* Parse and discard the requires-clause. */ cp_lexer_consume_token (parser->lexer); cp_parser_requires_clause (parser); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 906cfe0..f48f460 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2616,8 +2616,8 @@ check_template_variable (tree decl) { if (cxx_dialect < cxx14) pedwarn (DECL_SOURCE_LOCATION (decl), 0, - "variable templates only available with " - "-std=c++14 or -std=gnu++14"); + "variable templates only available with " + "%<-std=c++14%> or %<-std=gnu++14%>"); // Namespace-scope variable templates should have a template header. ++wanted; @@ -5292,7 +5292,7 @@ check_default_tmpl_args (tree decl, tree parms, bool is_primary, "friend declarations"); else if (TREE_CODE (decl) == FUNCTION_DECL && (cxx_dialect == cxx98)) msg = G_("default template arguments may not be used in function templates " - "without -std=c++11 or -std=gnu++11"); + "without %<-std=c++11%> or %<-std=gnu++11%>"); else if (is_partial) msg = G_("default template arguments may not be used in " "partial specializations"); @@ -10191,7 +10191,7 @@ push_tinst_level_loc (tree tldcl, tree targs, location_t loc) at_eof = 2; fatal_error (input_location, "template instantiation depth exceeds maximum of %d" - " (use -ftemplate-depth= to increase the maximum)", + " (use %<-ftemplate-depth=%> to increase the maximum)", max_tinst_depth); return false; } @@ -24727,9 +24727,9 @@ instantiate_pending_templates (int retries) fatal_error (input_location, "template instantiation depth exceeds maximum of %d" - " instantiating %q+D, possibly from virtual table generation" - " (use -ftemplate-depth= to increase the maximum)", - max_tinst_depth, decl); + " instantiating %q+D, possibly from virtual table generation" + " (use %<-ftemplate-depth=%> to increase the maximum)", + max_tinst_depth, decl); if (TREE_CODE (decl) == FUNCTION_DECL) /* Pretend that we defined it. */ DECL_INITIAL (decl) = error_mark_node; @@ -25102,7 +25102,7 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) if (cxx_dialect < cxx2a) { error ("non-type template parameters of class type only available " - "with -std=c++2a or -std=gnu++2a"); + "with %<-std=c++2a%> or %<-std=gnu++2a%>"); return true; } if (!complete_type_or_else (type, NULL_TREE)) diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index f83045a..5588e6a 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -110,7 +110,7 @@ get_base_filename (const char *filename) if (p && ! compiling) { - warning (0, "-frepo must be used with -c"); + warning (0, "%<-frepo%> must be used with %<-c%>"); flag_use_repository = 0; return NULL; } diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index c4aabea..3ca2b5e 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -310,7 +310,7 @@ typeid_ok_p (void) { if (! flag_rtti) { - error ("cannot use % with -fno-rtti"); + error ("cannot use % with %<-fno-rtti%>"); return false; } @@ -719,7 +719,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) if (!flag_rtti) { if (complain & tf_error) - error ("% not permitted with -fno-rtti"); + error ("% not permitted with %<-fno-rtti%>"); return error_mark_node; } diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index eca6b52..af077e7 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3990,11 +3990,11 @@ maybe_warn_parm_abi (tree t, location_t loc) bool w; auto_diagnostic_group d; if (flag_abi_version > 12) - w = warning_at (loc, OPT_Wabi, "-fabi-version=13 (GCC 8.2) fixes the " - "calling convention for %qT, which was accidentally " - "changed in 8.1", t); + w = warning_at (loc, OPT_Wabi, "%<-fabi-version=13%> (GCC 8.2) fixes " + "the calling convention for %qT, which was " + "accidentally changed in 8.1", t); else - w = warning_at (loc, OPT_Wabi, "-fabi-version=12 (GCC 8.1) accident" + w = warning_at (loc, OPT_Wabi, "%<-fabi-version=12%> (GCC 8.1) accident" "ally changes the calling convention for %qT", t); if (w) inform (location_of (t), " declared here"); @@ -4003,7 +4003,7 @@ maybe_warn_parm_abi (tree t, location_t loc) auto_diagnostic_group d; if (warning_at (loc, OPT_Wabi, "the calling convention for %qT changes in " - "-fabi-version=13 (GCC 8.2)", t)) + "%<-fabi-version=13%> (GCC 8.2)", t)) inform (location_of (t), " because all of its copy and move " "constructors are deleted"); } diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c index 2838def..ebaa310 100644 --- a/gcc/dbgcnt.c +++ b/gcc/dbgcnt.c @@ -91,22 +91,22 @@ dbg_cnt_set_limit_by_name (const char *name, int low, int high) { if (high < low) { - error ("-fdbg-cnt=%s:%d:%d has smaller upper limit than the lower", + error ("%<-fdbg-cnt=%s:%d:%d%> has smaller upper limit than the lower", name, low, high); return false; } if (low < 0) { - error ("Lower limit %d of -fdbg-cnt=%s must be a non-negative number", low, - name); + error ("Lower limit %d of %<-fdbg-cnt=%s%> must be a non-negative " + "number", low, name); return false; } if (high < 0) { - error ("Upper limit %d of -fdbg-cnt=%s must be a non-negative number", high, - name); + error ("Upper limit %d of %<-fdbg-cnt=%s%> must be a non-negative " + "number", high, name); return false; } @@ -173,7 +173,7 @@ dbg_cnt_process_opt (const char *arg) char *buffer = XALLOCAVEC (char, start + 2); sprintf (buffer, "%*c", start + 1, '^'); error ("cannot find a valid counter:value pair:"); - error ("-fdbg-cnt=%s", next); + error ("%<-fdbg-cnt=%s%>", next); error (" %s", buffer); } } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e074ee3..8305555 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10982,8 +10982,8 @@ output_dwarf_version () static bool once; if (!once) { - warning (0, - "-gdwarf-6 is output as version 5 with incompatibilities"); + warning (0, "%<-gdwarf-6%> is output as version 5 with " + "incompatibilities"); once = true; } dw2_asm_output_data (2, 5, "DWARF version number"); diff --git a/gcc/except.c b/gcc/except.c index 29437f3..e760c44 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2288,7 +2288,7 @@ expand_eh_return (void) if (rtx handler = EH_RETURN_HANDLER_RTX) emit_move_insn (handler, crtl->eh.ehr_handler); else - error ("__builtin_eh_return not supported on this target"); + error ("%<__builtin_eh_return%> not supported on this target"); } emit_label (around_label); diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8ad4361..1c738ba 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,14 @@ +2019-03-11 Martin Liska + + * 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-10 Thomas Koenig PR fortran/66089 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 31c7fb6..a29e2db 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3440,7 +3440,7 @@ match_record_decl (char *name) { gfc_current_locus = old_loc; gfc_error ("RECORD at %C is an extension, enable it with " - "-fdec-structure"); + "%<-fdec-structure%>"); return MATCH_ERROR; } m = gfc_match (" %n/", name); @@ -8651,8 +8651,8 @@ gfc_match_pointer (void) { if (!flag_cray_pointer) { - gfc_error ("Cray pointer declaration at %C requires -fcray-pointer " - "flag"); + gfc_error ("Cray pointer declaration at %C requires " + "%<-fcray-pointer%> flag"); return MATCH_ERROR; } return cray_pointer_decl (); diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 4e95f24..08bd8e0 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1642,7 +1642,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) { gfc_error ("The number of elements in the array constructor " "at %L requires an increase of the allowed %d " - "upper limit. See -fmax-array-constructor " + "upper limit. See %<-fmax-array-constructor%> " "option", &expr->where, flag_max_array_constructor); return false; } diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index f8d3a69..4797b3d 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1125,8 +1125,8 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag, locus loc) gfc_warning_now (OPT_Wintrinsics_std, "The intrinsic %qs at %L is not " "included in the selected standard but %s and %qs will" " be treated as if declared EXTERNAL. Use an" - " appropriate -std=* option or define" - " -fall-intrinsics to allow this intrinsic.", + " appropriate %<-std=%>* option or define" + " %<-fall-intrinsics%> to allow this intrinsic.", sym->name, &loc, symstd, sym->name); return false; diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index f2a0151..02970d5 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -263,7 +263,7 @@ gfc_post_options (const char **pfilename) /* Excess precision other than "fast" requires front-end support. */ if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for Fortran"); + sorry ("%<-fexcess-precision=standard%> for Fortran"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; /* Fortran allows associative math - but we cannot reassociate if diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index fa764dc..5bfb90c 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -237,7 +237,7 @@ match_integer_constant (gfc_expr **result, int signflag) if (gfc_range_check (e) != ARITH_OK) { gfc_error ("Integer too big for its kind at %C. This check can be " - "disabled with the option -fno-range-check"); + "disabled with the option %<-fno-range-check%>"); gfc_free_expr (e); return MATCH_ERROR; diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 28732e4..debdbd9 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -1156,13 +1156,13 @@ translate_common (gfc_common_head *common, gfc_symbol *var_list) gfc_warning (OPT_Walign_commons, "Padding of %d bytes required before %qs in " "COMMON %qs at %L; reorder elements or use " - "-fno-align-commons", (int)offset, + "%<-fno-align-commons%>", (int)offset, s->sym->name, common->name, &common->where); else gfc_warning (OPT_Walign_commons, "Padding of %d bytes required before %qs in " "COMMON at %L; reorder elements or use " - "-fno-align-commons", (int)offset, + "%<-fno-align-commons%>", (int)offset, s->sym->name, &common->where); } } diff --git a/gcc/gcc.c b/gcc/gcc.c index 481e828..4f57765 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3075,7 +3075,7 @@ execute (void) if (arg && strcmp (arg, "|") == 0) { /* each command. */ #if defined (__MSDOS__) || defined (OS2) || defined (VMS) - fatal_error (input_location, "-pipe not supported"); + fatal_error (input_location, "%<-pipe%> not supported"); #endif argbuf[i] = 0; /* Termination of command args. */ @@ -4148,7 +4148,7 @@ driver_handle_option (struct gcc_options *opts, || strcmp (arg, "object") == 0) save_temps_flag = SAVE_TEMPS_OBJ; else - fatal_error (input_location, "%qs is an unknown -save-temps option", + fatal_error (input_location, "%qs is an unknown %<-save-temps%> option", decoded->orig_option_with_args_text); break; @@ -4651,7 +4651,7 @@ process_command (unsigned int decoded_options_count, { /* -save-temps overrides -pipe, so that temp files are produced */ if (save_temps_flag) - warning (0, "-pipe ignored because -save-temps specified"); + warning (0, "%<-pipe%> ignored because %<-save-temps%> specified"); use_pipes = 0; } @@ -7243,7 +7243,7 @@ compare_files (char *cmpfile[]) if (!ret && length[0] != length[1]) { - error ("%s: -fcompare-debug failure (length)", gcc_input_filename); + error ("%s: %<-fcompare-debug%> failure (length)", gcc_input_filename); ret = 1; } @@ -7273,7 +7273,7 @@ compare_files (char *cmpfile[]) { if (memcmp (map[0], map[1], length[0]) != 0) { - error ("%s: -fcompare-debug failure", gcc_input_filename); + error ("%s: %<-fcompare-debug%> failure", gcc_input_filename); ret = 1; } } @@ -7310,7 +7310,7 @@ compare_files (char *cmpfile[]) if (c0 != c1) { - error ("%s: -fcompare-debug failure", + error ("%s: %<-fcompare-debug%> failure", gcc_input_filename); ret = 1; break; @@ -8086,7 +8086,8 @@ driver::prepare_infiles () if (!combine_inputs && have_c && have_o && lang_n_infiles > 1) fatal_error (input_location, - "cannot specify -o with -c, -S or -E with multiple files"); + "cannot specify %<-o%> with %<-c%>, %<-S%> or %<-E%> " + "with multiple files"); /* No early exit needed from main; we can continue. */ return false; @@ -8152,7 +8153,7 @@ driver::do_spec_on_infiles () const { if (verbose_flag) inform (UNKNOWN_LOCATION, - "recompiling with -fcompare-debug"); + "recompiling with %<-fcompare-debug%>"); compare_debug = -compare_debug; n_switches = n_switches_debug_check[1]; @@ -8168,7 +8169,7 @@ driver::do_spec_on_infiles () const if (value < 0) { - error ("during -fcompare-debug recompilation"); + error ("during %<-fcompare-debug%> recompilation"); this_file_error = 1; } @@ -8294,7 +8295,7 @@ driver::maybe_run_linker (const char *argv0) const false); if (!temp_spec) fatal_error (input_location, - "-fuse-linker-plugin, but %s not found", + "%<-fuse-linker-plugin%>, but %s not found", LTOPLUGINSONAME); linker_plugin_file_spec = convert_white_space (temp_spec); } diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 96d74b7..39c7b26 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Martin Liska + + * 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-09 Jakub Jelinek PR target/79645 diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index c6c3304..5a35d47 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -864,7 +864,7 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) { /* -fltrans and -fwpa are mutually exclusive. Check for that here. */ if (flag_wpa && flag_ltrans) - error ("-fwpa and -fltrans are mutually exclusive"); + error ("%<-fwpa%> and %<-fltrans%> are mutually exclusive"); if (flag_ltrans) { @@ -898,7 +898,8 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) lang_hooks.lto.append_data = lhd_append_data; lang_hooks.lto.end_section = lhd_end_section; if (flag_ltrans) - error ("-flinker-output=rel and -fltrans are mutually exclussive"); + error ("%<-flinker-output=rel%> and %<-fltrans%> are mutually " + "exclussive"); break; case LTO_LINKER_OUTPUT_NOLTOREL: /* .o: incremental link producing asm */ diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 343915c..ea9d21d 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -750,7 +750,7 @@ lto_symtab_merge_decls_2 (symtab_node *first, bool diagnosed_p) if (tbaa_p) inform (DECL_SOURCE_LOCATION (prevailing->decl), "code may be misoptimized unless " - "-fno-strict-aliasing is used"); + "%<-fno-strict-aliasing is used%>"); mismatches.release (); } diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 201c459..7c65b2b 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -639,7 +639,7 @@ oacc_parse_default_dims (const char *dims) { malformed: error_at (UNKNOWN_LOCATION, - "-fopenacc-dim operand is malformed at '%s'", pos); + "%<-fopenacc-dim%> operand is malformed at '%s'", pos); } } diff --git a/gcc/opts-global.c b/gcc/opts-global.c index 1c24c85..a5e9ef0 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -448,8 +448,8 @@ handle_common_deferred_options (void) case OPT_fasan_shadow_offset_: if (!(flag_sanitize & SANITIZE_KERNEL_ADDRESS)) - error ("-fasan-shadow-offset should only be used " - "with -fsanitize=kernel-address"); + error ("%<-fasan-shadow-offset%> should only be used " + "with %<-fsanitize=kernel-address%>"); if (!set_asan_shadow_offset (opt->arg)) error ("unrecognized shadow offset %qs", opt->arg); break; diff --git a/gcc/opts.c b/gcc/opts.c index 468abb1..3161e0b 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1927,14 +1927,14 @@ parse_sanitizer_options (const char *p, location_t loc, int scode, if (hint) error_at (loc, - "unrecognized argument to -f%ssanitize%s= option: %q.*s;" - " did you mean %qs?", + "unrecognized argument to %<-f%ssanitize%s=%> " + "option: %q.*s; did you mean %qs?", value ? "" : "no-", suffix, (int) len, p, hint); else error_at (loc, - "unrecognized argument to -f%ssanitize%s= option: %q.*s", - value ? "" : "no-", + "unrecognized argument to %<-f%ssanitize%s=%> option: " + "%q.*s", value ? "" : "no-", suffix, (int) len, p); } @@ -2677,9 +2677,9 @@ common_handle_option (struct gcc_options *opts, case OPT_gdwarf: if (arg && strlen (arg) != 0) { - error_at (loc, "%<-gdwarf%s%> is ambiguous; " - "use %<-gdwarf-%s%> for DWARF version " - "or %<-gdwarf -g%s%> for debug level", arg, arg, arg); + error_at (loc, "%<-gdwarf%s%> is ambiguous; " + "use %<-gdwarf-%s%> for DWARF version " + "or %<-gdwarf%> %<-g%s%> for debug level", arg, arg, arg); break; } else @@ -3079,10 +3079,10 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask, strcpy (new_option + 1, arg); option_index = find_opt (new_option, lang_mask); if (option_index == OPT_SPECIAL_unknown) - error_at (loc, "-Werror=%s: no option -%s", arg, new_option); + error_at (loc, "%<-Werror=%s%>: no option -%s", arg, new_option); else if (!(cl_options[option_index].flags & CL_WARNING)) - error_at (loc, "-Werror=%s: -%s is not an option that controls warnings", - arg, new_option); + error_at (loc, "%<-Werror=%s%>: -%s is not an option that controls " + "warnings", arg, new_option); else { const diagnostic_t kind = value ? DK_ERROR : DK_WARNING; diff --git a/gcc/passes.c b/gcc/passes.c index 41aa765..02561f8 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1021,9 +1021,9 @@ enable_disable_pass (const char *arg, bool is_enable) if (!*phase_name) { if (is_enable) - error ("unrecognized option -fenable"); + error ("unrecognized option %<-fenable%>"); else - error ("unrecognized option -fdisable"); + error ("unrecognized option %<-fdisable%>"); free (argstr); return; } @@ -1031,9 +1031,9 @@ enable_disable_pass (const char *arg, bool is_enable) if (!pass || pass->static_pass_number == -1) { if (is_enable) - error ("unknown pass %s specified in -fenable", phase_name); + error ("unknown pass %s specified in %<-fenable%>", phase_name); else - error ("unknown pass %s specified in -fdisable", phase_name); + error ("unknown pass %s specified in %<-fdisable%>", phase_name); free (argstr); return; } diff --git a/gcc/plugin.c b/gcc/plugin.c index f6c61d2..2896c6a 100644 --- a/gcc/plugin.c +++ b/gcc/plugin.c @@ -290,7 +290,7 @@ parse_plugin_arg_opt (const char *arg) if (!key_start) { - error ("malformed option -fplugin-arg-%s (missing -[=])", + error ("malformed option %<-fplugin-arg-%s%> (missing -[=])", arg); return; } @@ -353,7 +353,7 @@ parse_plugin_arg_opt (const char *arg) plugin->argv[plugin->argc - 1].value = value; } else - error ("plugin %s should be specified before -fplugin-arg-%s " + error ("plugin %s should be specified before %<-fplugin-arg-%s%> " "in the command line", name, arg); /* We don't need the plugin's name anymore. Just release it. */ @@ -1003,6 +1003,6 @@ default_plugin_dir_name (void) { if (!plugindir_string) fatal_error (input_location, - "-iplugindir option not passed from the gcc driver"); + "%<-iplugindir%> option not passed from the gcc driver"); return plugindir_string; } diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 529590b..318f7e9 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -188,7 +188,7 @@ default_const_not_ok_for_debug_p (rtx x) rtx default_expand_builtin_saveregs (void) { - error ("__builtin_saveregs not supported by this target"); + error ("%<__builtin_saveregs%> not supported by this target"); return const0_rtx; } @@ -2031,9 +2031,9 @@ default_pch_valid_p (const void *data_p, size_t len) /* -fpic and -fpie also usually make a PCH invalid. */ if (data[0] != flag_pic) - return _("created and used with different settings of -fpic"); + return _("created and used with different settings of %<-fpic%>"); if (data[1] != flag_pie) - return _("created and used with different settings of -fpie"); + return _("created and used with different settings of %<-fpie%>"); data += 2; /* Check target_flags. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5d09166..aec924f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2019-03-11 Martin Liska + + * 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. + 2019-03-11 Andreas Krebbel * gcc.target/s390/zvector/vec-addc-u128.c: New test. diff --git a/gcc/testsuite/g++.dg/conversion/simd3.C b/gcc/testsuite/g++.dg/conversion/simd3.C index 8d96264..959ad50 100644 --- a/gcc/testsuite/g++.dg/conversion/simd3.C +++ b/gcc/testsuite/g++.dg/conversion/simd3.C @@ -10,6 +10,6 @@ unsigned int __attribute__((vector_size(16))) e; void foo() { b + d; /* { dg-error "invalid operands to binary" } */ - d += e; /* { dg-message "use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts.*cannot convert '__vector.4. unsigned int' to '__vector.4. int' in assignment" } */ + d += e; /* { dg-message "use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts.*cannot convert '__vector.4. unsigned int' to '__vector.4. int' in assignment" } */ d2 += d; } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp3.C b/gcc/testsuite/g++.dg/cpp1z/decomp3.C index 4d75e93..95e9f37 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp3.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp3.C @@ -10,35 +10,35 @@ void test (A &b, B c) { int && [ d ] = c; // { dg-error "structured binding declaration cannot have type 'int'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } char & [ e, f, ff ] { b }; // { dg-error "structured binding declaration cannot have type 'char'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto&[g,h,i]=b; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto&[g,h,i]=b; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } decltype (auto) [ j ] = c; // { dg-error "structured binding declaration cannot have type 'decltype.auto.'" "" { target c++14 } } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } // { dg-error "expected primary-expression before 'decltype'" "" { target c++11_down } .-2 } auto & & && & [ m, n, o ] = b; // { dg-error "multiple ref-qualifiers" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } constexpr auto [ p ] = c; // { dg-error "structured binding declaration cannot be 'constexpr'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } friend auto [ q ] = c; // { dg-error "'friend' used outside of class" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } typedef auto [ r ] = c; // { dg-error "structured binding declaration cannot be 'typedef'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } inline auto [ s ] = c; // { dg-error "structured binding declaration cannot be 'inline'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } __restrict auto [ t ] = c; // { dg-error "invalid use of 'restrict'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } long long auto [ u ] = c; // { dg-error "'long long' specified with 'auto'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } virtual auto [ v ] = c; // { dg-error "'virtual' outside class declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } explicit auto [ w ] = c; // { dg-error "'explicit' outside class declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } static auto [ x ] = c; // { dg-error "structured binding declaration cannot be 'static'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } extern auto [ y ] { c }; // { dg-error "structured binding declaration cannot be 'extern'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } } void @@ -53,19 +53,19 @@ test3 (A &b, B c) { auto [ d, e, f ] = arr; // { dg-error "only 3 names provided" } // { dg-message "while 'int .4.' decomposes into 4 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto & [ g, h, i, j, k ] = arr; // { dg-error "5 names provided" } // { dg-message "while 'int .4.' decomposes into 4 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto [ l, m ] = b; // { dg-error "only 2 names provided" } // { dg-message "while 'A' decomposes into 3 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto & [ n, o, p, q ] = b; // { dg-error "4 names provided" } // { dg-message "while 'A' decomposes into 3 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto [] { c }; // { dg-error "empty structured binding declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ r, s ] = c; // { dg-error "2 names provided" } // { dg-message "while 'B' decomposes into 1 element" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp4.C b/gcc/testsuite/g++.dg/cpp1z/decomp4.C index 69b5455..f2d491f 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp4.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp4.C @@ -15,18 +15,18 @@ void test (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i) { auto [ j ] = a; // { dg-error "cannot decompose class type 'A' because it has an anonymous struct member" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ k ] { b }; // { dg-error "cannot decompose class type 'B' because it has an anonymous union member" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ l, l2 ] = c; // { dg-error "cannot decompose inaccessible member 'C::b' of 'C'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ m ] = d; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ m ] = d; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto [ n ] { e }; // { dg-error "cannot decompose inaccessible member 'E::a' of 'E'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ o ] { f }; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ o ] { f }; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto & [ p ] { g }; // { dg-error "cannot decompose class type 'G': both it and its base class 'F' have non-static data members" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ q ] { h }; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ q ] { h }; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto [ r ] { i }; // { dg-error "cannot decompose class type 'I': its base classes 'F' and 'H' have non-static data members" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp44.C b/gcc/testsuite/g++.dg/cpp1z/decomp44.C index 168a13e..c797a1a 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp44.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp44.C @@ -7,4 +7,4 @@ extern struct A a; template void foo() { auto[i] = a; // { dg-warning "incomplete" } -} // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } +} // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp45.C b/gcc/testsuite/g++.dg/cpp1z/decomp45.C index 27874fb..c79e7c9 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp45.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp45.C @@ -8,7 +8,7 @@ template void f() { auto [x] = a; // { dg-warning "incomplete" } -} // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } +} // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/opt/pr34036.C b/gcc/testsuite/g++.dg/opt/pr34036.C index f4e18c8..96f09cd 100644 --- a/gcc/testsuite/g++.dg/opt/pr34036.C +++ b/gcc/testsuite/g++.dg/opt/pr34036.C @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fsignaling-nans" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ template class ggStaticArray { diff --git a/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C b/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C index 0984af9..46124cb 100644 --- a/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C +++ b/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C @@ -3,13 +3,13 @@ // { dg-options "-std=c++98" } constexpr int a = 1; // { dg-bogus "did you mean" } -// { dg-error ".constexpr. does not name a type" "" { target *-*-* } .-1 } -// { dg-message "C\\+\\+11 .constexpr. only available with -std=c\\+\\+11 or -std=gnu\\+\\+11" "" { target *-*-* } .-2 } +// { dg-error "'constexpr' does not name a type" "" { target *-*-* } .-1 } +// { dg-message "C\\+\\+11 'constexpr' only available with '-std=c\\+\\+11' or '-std=gnu\\+\\+11'" "" { target *-*-* } .-2 } /* If the user typos "constexpr" (here as "consexpr"), don't offer it as a spelling suggestion in C++98 mode. */ consexpr int a = 1; // { dg-bogus "did you mean" } -// { dg-error ".consexpr. does not name a type" "" { target *-*-* } .-1 } +// { dg-error "'consexpr' does not name a type" "" { target *-*-* } .-1 } decltype i = 0; // { dg-bogus "did you mean" } -// { dg-error ".decltype. does not name a type" "" { target *-*-* } .-1 } +// { dg-error "'decltype' does not name a type" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/gcc.dg/c90-fordecl-1.c b/gcc/testsuite/gcc.dg/c90-fordecl-1.c index 0fb9b20..46ba16a 100644 --- a/gcc/testsuite/gcc.dg/c90-fordecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-fordecl-1.c @@ -9,6 +9,6 @@ foo (void) int j = 0; for (int i = 1; i <= 10; i++) /* { dg-bogus "warning" "warning in place of error" } */ /* { dg-error "'for' loop initial declarations are only allowed in C99 or C11 mode" "declaration in for loop" { target *-*-* } .-1 } */ - /* { dg-message "note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code" "note" { target *-*-* } .-2 }} */ + /* { dg-message "note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code" "note" { target *-*-* } .-2 }} */ j += i; } diff --git a/gcc/testsuite/gcc.dg/cpp/dir-only-4.c b/gcc/testsuite/gcc.dg/cpp/dir-only-4.c index a7b5f04..25f1b46 100644 --- a/gcc/testsuite/gcc.dg/cpp/dir-only-4.c +++ b/gcc/testsuite/gcc.dg/cpp/dir-only-4.c @@ -3,4 +3,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fdirectives-only -Wunused-macros" } */ -/* { dg-error "-fdirectives-only is incompatible with -Wunused_macros\n" "-Wunused-macros check" { target *-*-* } 0 } */ +/* { dg-error "'-fdirectives-only' is incompatible with '-Wunused-macros'\n" "'-Wunused-macros' check" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/dir-only-5.c b/gcc/testsuite/gcc.dg/cpp/dir-only-5.c index 643a4d7..ad8e11e 100644 --- a/gcc/testsuite/gcc.dg/cpp/dir-only-5.c +++ b/gcc/testsuite/gcc.dg/cpp/dir-only-5.c @@ -3,4 +3,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fdirectives-only -traditional" } */ -/* { dg-error "-fdirectives-only is incompatible with -traditional\n" "-traditional check" { target *-*-* } 0 } */ +/* { dg-error "'-fdirectives-only' is incompatible with '-traditional'\n" "'-traditional' check" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/pr71591.c b/gcc/testsuite/gcc.dg/cpp/pr71591.c index 0e3d7b1..8553396 100644 --- a/gcc/testsuite/gcc.dg/cpp/pr71591.c +++ b/gcc/testsuite/gcc.dg/cpp/pr71591.c @@ -2,4 +2,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fself-test=fake-value" } */ -/* { dg-message "self-tests incompatible with -E" "" { target *-*-* } 0 } */ +/* { dg-message "self-tests incompatible with '-E'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-1.c b/gcc/testsuite/gcc.dg/format/opt-1.c index f8f3704..8800454 100644 --- a/gcc/testsuite/gcc.dg/format/opt-1.c +++ b/gcc/testsuite/gcc.dg/format/opt-1.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-extra-args" } */ -/* { dg-warning "-Wformat-extra-args ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-extra-args' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-2.c b/gcc/testsuite/gcc.dg/format/opt-2.c index 1ec9f01..1036773 100644 --- a/gcc/testsuite/gcc.dg/format/opt-2.c +++ b/gcc/testsuite/gcc.dg/format/opt-2.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-nonliteral" } */ -/* { dg-warning "-Wformat-nonliteral ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-nonliteral' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-3.c b/gcc/testsuite/gcc.dg/format/opt-3.c index 03f55e4..64a9242 100644 --- a/gcc/testsuite/gcc.dg/format/opt-3.c +++ b/gcc/testsuite/gcc.dg/format/opt-3.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-security" } */ -/* { dg-warning "-Wformat-security ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-security' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-4.c b/gcc/testsuite/gcc.dg/format/opt-4.c index f02b6c0..a82e41a 100644 --- a/gcc/testsuite/gcc.dg/format/opt-4.c +++ b/gcc/testsuite/gcc.dg/format/opt-4.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-y2k" } */ -/* { dg-warning "-Wformat-y2k ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-y2k' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-5.c b/gcc/testsuite/gcc.dg/format/opt-5.c index 3315e33..d031a25 100644 --- a/gcc/testsuite/gcc.dg/format/opt-5.c +++ b/gcc/testsuite/gcc.dg/format/opt-5.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-zero-length" } */ -/* { dg-warning "-Wformat-zero-length ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-zero-length' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-6.c b/gcc/testsuite/gcc.dg/format/opt-6.c index 29dedfa..6cabd81 100644 --- a/gcc/testsuite/gcc.dg/format/opt-6.c +++ b/gcc/testsuite/gcc.dg/format/opt-6.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-contains-nul" } */ -/* { dg-warning "-Wformat-contains-nul ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-contains-nul' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/pr22231.c b/gcc/testsuite/gcc.dg/pr22231.c index 2107006..e879435 100644 --- a/gcc/testsuite/gcc.dg/pr22231.c +++ b/gcc/testsuite/gcc.dg/pr22231.c @@ -2,6 +2,6 @@ /* { dg-do compile } */ /* { dg-options "-MG -MD -c" } */ -/* { dg-error "may only be used with -M" "-MG incompatible with -c" { target *-*-* } 0 } */ +/* { dg-error "may only be used with .-M." ".-MG. incompatible with .-c." { target *-*-* } 0 } */ int anything; diff --git a/gcc/testsuite/gcc.dg/pr33007.c b/gcc/testsuite/gcc.dg/pr33007.c index cdc8c6a..c583ab6 100644 --- a/gcc/testsuite/gcc.dg/pr33007.c +++ b/gcc/testsuite/gcc.dg/pr33007.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -ffast-math -ftrapping-math" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning ".-fassociative-math. disabled" "" { target *-*-* } 0 } */ long foo (int i) diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c index e92662e..d77f2bb 100644 --- a/gcc/testsuite/gcc.dg/simd-1.c +++ b/gcc/testsuite/gcc.dg/simd-1.c @@ -32,7 +32,7 @@ hanneke () e = (typeof (e)) a; /* Different signed SIMD assignment. */ - f = a; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ + f = a; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-1 } */ /* Casted different signed SIMD assignment. */ diff --git a/gcc/testsuite/gcc.dg/simd-5.c b/gcc/testsuite/gcc.dg/simd-5.c index cacc469..f53e4ab 100644 --- a/gcc/testsuite/gcc.dg/simd-5.c +++ b/gcc/testsuite/gcc.dg/simd-5.c @@ -4,5 +4,5 @@ /* Ensure that we don't need a typedef to initialize a vector type. */ #define vector __attribute__ ((vector_size (8))) vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */ -vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ +vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/simd-6.c b/gcc/testsuite/gcc.dg/simd-6.c index 86363ae..ce5fcf5 100644 --- a/gcc/testsuite/gcc.dg/simd-6.c +++ b/gcc/testsuite/gcc.dg/simd-6.c @@ -4,5 +4,5 @@ /* Ensure that we don't need a typedef to initialize a vector type. */ #define vector __attribute__ ((vector_size (8))) vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */ -vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ +vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-14.c b/gcc/testsuite/gcc.dg/spellcheck-options-14.c index 5582460..3cd38ce 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-14.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-14.c @@ -3,6 +3,6 @@ /* { dg-do compile } */ /* { dg-options "-fsanitize=addres,nul,this-is-not-a-sanitizer-option" } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .addres.; did you mean .address." "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .nul.; did you mean .null." "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .this-is-not-a-sanitizer-option." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'addres'; did you mean 'address'" "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'nul'; did you mean 'null'" "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'this-is-not-a-sanitizer-option'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-15.c b/gcc/testsuite/gcc.dg/spellcheck-options-15.c index 089e698..c190334 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-15.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-15.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-fsanitize=al" } */ /* { dg-bogus "did you mean" "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .al." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'al'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-16.c b/gcc/testsuite/gcc.dg/spellcheck-options-16.c index 7019576..f802e61 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-16.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-16.c @@ -6,4 +6,4 @@ /* Ensure we don't offer non-recoverable "-fsanitize-recover=thread" as a suggestion. */ /* { dg-bogus "did you mean" "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize-recover= option: .threed." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize-recover=' option: 'threed'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-17.c b/gcc/testsuite/gcc.dg/spellcheck-options-17.c index 1012dca..6be5d27 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-17.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-17.c @@ -1,3 +1,3 @@ /* { dg-do compile } */ /* { dg-options "-fno-sanitize=threed" } */ -/* { dg-error "unrecognized argument to -fno-sanitize= option: .threed.; did you mean .thread." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fno-sanitize=' option: 'threed'; did you mean 'thread'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c index 3ee6b7f..7cdf1d0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim2" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ double F[2] = { 0., 0. }, e = 0.; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c index c45cf2f..6ac0559 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c @@ -1,6 +1,6 @@ /* { dg-options "-O1 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-optimized" } */ /* { dg-do compile } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ /* Test the reciprocal optimizations together with trapping math. */ diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c b/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c index d8d2e5a..427df57 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c @@ -3,8 +3,8 @@ /* { dg-final { scan-assembler-not "endbr" } } */ /* { dg-final { scan-assembler-not "notrack call\[ \t]+" } } */ -int func (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ -int (*fptr) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +int func (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ +int (*fptr) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ int foo (int arg) { @@ -16,7 +16,7 @@ int foo (int arg) int __attribute__ ((nocf_check)) func (int arg) -{ /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ - int (*fptrl) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +{ /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ + int (*fptrl) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ return arg*(*fptrl)(arg); } diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c index 0bddf54..b90019f 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c @@ -20,7 +20,7 @@ fn2 (int x) static __attribute__((noinline, nocf_check)) int fn3 (int x) -{ /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +{ /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ return x + 12; } diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c index ed2d53a..3eec1e0 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c @@ -8,7 +8,7 @@ int (*foo)(int); -typedef int (*type1_t) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +typedef int (*type1_t) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ typedef int (*type2_t) (int); static __attribute__((noinline)) int diff --git a/gcc/testsuite/gcc.target/powerpc/warn-1.c b/gcc/testsuite/gcc.target/powerpc/warn-1.c index b9f744b..76ac0c4 100644 --- a/gcc/testsuite/gcc.target/powerpc/warn-1.c +++ b/gcc/testsuite/gcc.target/powerpc/warn-1.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O -mvsx -mno-altivec" } */ -/* { dg-warning "-mvsx and -mno-altivec are incompatible" "" { target *-*-* } 0 } */ +/* { dg-warning "'-mvsx' and '-mno-altivec' are incompatible" "" { target *-*-* } 0 } */ double foo (double *x, double *y) diff --git a/gcc/testsuite/gcc.target/powerpc/warn-2.c b/gcc/testsuite/gcc.target/powerpc/warn-2.c index 427c694..29c6ce5 100644 --- a/gcc/testsuite/gcc.target/powerpc/warn-2.c +++ b/gcc/testsuite/gcc.target/powerpc/warn-2.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O -mdejagnu-cpu=power7 -mno-altivec" } */ -/* { dg-warning "-mno-altivec disables vsx" "" { target *-*-* } 0 } */ +/* { dg-warning "'-mno-altivec' disables vsx" "" { target *-*-* } 0 } */ double foo (double *x, double *y) diff --git a/gcc/toplev.c b/gcc/toplev.c index d3719ff..397a164 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 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 7196614..c8d6d1b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3444,8 +3444,8 @@ verify_gimple_call (gcall *stmt) __builtin_unreachable internally, for example when IPA figures out a call cannot happen in a legal program. In such cases, we must make sure arguments are stripped off. */ - error ("__builtin_unreachable or __builtin_trap call with " - "arguments"); + error ("%<__builtin_unreachable%> or %<__builtin_trap%> call " + "with arguments"); return true; } break; diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 956e39f..829b984 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3674,7 +3674,7 @@ inline_forbidden_p_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p, return from the function the inline has been inlined into. */ inline_forbidden_reason = G_("function %q+F can never be inlined because " - "it uses __builtin_return or __builtin_apply_args"); + "it uses %<__builtin_return%> or %<__builtin_apply_args%>"); *handled_ops_p = true; return t; @@ -3794,8 +3794,8 @@ tree_inlinable_function_p (tree fn) && always_inline == NULL) { if (do_warning) - warning (OPT_Winline, "function %q+F can never be inlined because it " - "is suppressed using -fno-inline", fn); + warning (OPT_Winline, "function %q+F can never be inlined because it " + "is suppressed using %<-fno-inline%>", fn); inlinable = false; } diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index ba97838..55ff354 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -7182,7 +7182,7 @@ vt_find_locations (void) if (MAY_HAVE_DEBUG_BIND_INSNS) inform (DECL_SOURCE_LOCATION (cfun->decl), "variable tracking size limit exceeded with " - "-fvar-tracking-assignments, retrying without"); + "%<-fvar-tracking-assignments%>, retrying without"); else inform (DECL_SOURCE_LOCATION (cfun->decl), "variable tracking size limit exceeded"); -- cgit v1.1