aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-03-11 14:58:44 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-03-11 13:58:44 +0000
commita3f9f006a8e24bfc2a045b918a4f3665407f0018 (patch)
tree0681cfed14dcbfd9b59a61ace8c6b34b885c20fd /gcc/cp
parent355d4eb36aeb970743537e2f9b98d4c53c9e0eab (diff)
downloadgcc-a3f9f006a8e24bfc2a045b918a4f3665407f0018.zip
gcc-a3f9f006a8e24bfc2a045b918a4f3665407f0018.tar.gz
gcc-a3f9f006a8e24bfc2a045b918a4f3665407f0018.tar.bz2
Wrap option names in gcc internal messages with %< and %>.
2019-03-11 Martin Liska <mliska@suse.cz> * check-internal-format-escaping.py: New file. 2019-03-11 Martin Liska <mliska@suse.cz> * builtins.c (expand_builtin_thread_pointer): Wrap an option name in a string format message and fix GNU coding style. (expand_builtin_set_thread_pointer): Likewise. * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): Likewise. * common/config/alpha/alpha-common.c (alpha_handle_option): Likewise. * common/config/arc/arc-common.c (arc_handle_option): Likewise. * common/config/arm/arm-common.c (arm_parse_fpu_option): Likewise. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/i386/i386-common.c (ix86_handle_option): Likewise. * common/config/ia64/ia64-common.c (ia64_handle_option): Likewise. * common/config/m68k/m68k-common.c (m68k_handle_option): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * common/config/nds32/nds32-common.c (nds32_handle_option): Likewise. * common/config/powerpcspe/powerpcspe-common.c (rs6000_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::parse): Likewise. * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. * config/aarch64/aarch64.c (aarch64_parse_one_option_token): Likewise. (aarch64_override_options_internal): Likewise. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Likewise. * config/alpha/alpha.c (alpha_option_override): Likewise. * config/arc/arc.c (arc_init): Likewise. (parse_mrgf_banked_regs_option): Likewise. (arc_override_options): Likewise. (arc_expand_builtin_aligned): Likewise. * config/arm/arm-builtins.c (arm_expand_neon_builtin): Likewise. (arm_expand_builtin): Likewise. * config/arm/arm.c (arm_option_check_internal): Likewise. (arm_configure_build_target): Likewise. (arm_option_override): Likewise. (arm_options_perform_arch_sanity_checks): Likewise. (arm_handle_cmse_nonsecure_entry): Likewise. (arm_handle_cmse_nonsecure_call): Likewise. (arm_tls_referenced_p): Likewise. (thumb1_expand_prologue): Likewise. * config/avr/avr.c (avr_option_override): Likewise. * config/bfin/bfin.c (bfin_option_override): Likewise. * config/c6x/c6x.c (c6x_option_override): Likewise. * config/cr16/cr16.c (cr16_override_options): Likewise. * config/cris/cris.c (cris_option_override): Likewise. * config/csky/csky.c (csky_handle_isr_attribute): Likewise. * config/darwin-c.c (macosx_version_as_macro): Likewise. * config/darwin.c (darwin_override_options): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/h8300/h8300.c (h8300_option_override): Likewise. * config/i386/i386.c (parse_mtune_ctrl_str): Likewise. (ix86_option_override_internal): Likewise. (warn_once_call_ms2sysv_xlogues): Likewise. (ix86_expand_prologue): Likewise. (split_stack_prologue_scratch_regno): Likewise. (ix86_warn_parameter_passing_abi): Likewise. * config/ia64/ia64.c (fix_range): Likewise. * config/m68k/m68k.c (m68k_option_override): Likewise. * config/microblaze/microblaze.c (microblaze_option_override): Likewise. * config/mips/mips.c (mips_emit_probe_stack_range): Likewise. (mips_set_compression_mode): Likewise. * config/mmix/mmix.c (mmix_option_override): Likewise. * config/mn10300/mn10300.c (mn10300_option_override): Likewise. * config/msp430/msp430.c (msp430_option_override): Likewise. * config/nds32/nds32.c (nds32_option_override): Likewise. * config/nios2/nios2.c (nios2_custom_check_insns): Likewise. (nios2_option_override): Likewise. (nios2_expand_custom_builtin): Likewise. * config/nvptx/mkoffload.c (main): Likewise. * config/nvptx/nvptx.c (diagnose_openacc_conflict): Likewise. * config/pa/pa.c (fix_range): Likewise. (pa_option_override): Likewise. * config/riscv/riscv.c (riscv_parse_cpu): Likewise. (riscv_option_override): Likewise. * config/rl78/rl78.c (rl78_option_override): Likewise. * config/rs6000/aix61.h: Likewise. * config/rs6000/aix71.h: Likewise. * config/rs6000/aix72.h: Likewise. * config/rs6000/driver-rs6000.c (elf_platform): Likewise. * config/rs6000/freebsd64.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. (rs6000_expand_zeroop_builtin): Likewise. (rs6000_expand_mtfsb_builtin): Likewise. (rs6000_expand_set_fpscr_rn_builtin): Likewise. (rs6000_expand_set_fpscr_drn_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (rs6000_expand_split_stack_prologue): Likewise. * config/rs6000/rtems.h: Likewise. * config/rx/rx.c (valid_psw_flag): Likewise. (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. (s390_function_profiler): Likewise. (s390_option_override_internal): Likewise. (s390_option_override): Likewise. * config/sh/sh.c (sh_option_override): Likewise. (sh_builtin_saveregs): Likewise. (sh_fix_range): Likewise. * config/sh/vxworks.h: Likewise. * config/sparc/sparc.c (sparc_option_override): Likewise. * config/spu/spu.c (spu_option_override): Likewise. (fix_range): Likewise. * config/visium/visium.c (visium_option_override): Likewise. (visium_handle_interrupt_attr): Likewise. * config/xtensa/xtensa.c (xtensa_option_override): Likewise. * dbgcnt.c (dbg_cnt_set_limit_by_name): Likewise. (dbg_cnt_process_opt): Likewise. * dwarf2out.c (output_dwarf_version): Likewise. * except.c (expand_eh_return): Likewise. * gcc.c (defined): Likewise. (driver_handle_option): Likewise. (process_command): Likewise. (compare_files): Likewise. (driver::prepare_infiles): Likewise. (driver::do_spec_on_infiles): Likewise. (driver::maybe_run_linker): Likewise. * omp-offload.c (oacc_parse_default_dims): Likewise. * opts-global.c (handle_common_deferred_options): Likewise. * opts.c (parse_sanitizer_options): Likewise. (common_handle_option): Likewise. (enable_warning_as_error): Likewise. * passes.c (enable_disable_pass): Likewise. * plugin.c (parse_plugin_arg_opt): Likewise. (default_plugin_dir_name): Likewise. * targhooks.c (default_expand_builtin_saveregs): Likewise. (default_pch_valid_p): Likewise. * toplev.c (init_asm_output): Likewise. (process_options): Likewise. (toplev::run_self_tests): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-inline.c (inline_forbidden_p_stmt): Likewise. (tree_inlinable_function_p): Likewise. * var-tracking.c (vt_find_locations): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * gcc-interface/misc.c (gnat_post_options) Wrap an option name in a string format message and fix GNU coding style.: 2019-03-11 Martin Liska <mliska@suse.cz> * c-attribs.c (handle_nocf_check_attribute): Wrap an option name in a string format message and fix GNU coding style. * c-common.c (vector_types_convertible_p): Likewise. (c_build_vec_perm_expr): Likewise. * c-indentation.c (get_visual_column): Likewise. * c-opts.c (c_common_handle_option): Likewise. (c_common_post_options): Likewise. (sanitize_cpp_opts): Likewise. * c-pch.c (c_common_pch_pragma): Likewise. * c-pragma.c (handle_pragma_pack): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * c-decl.c (check_for_loop_decls): Wrap an option name in a string format message and fix GNU coding style. * c-parser.c (c_parser_declspecs): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * call.c (convert_arg_to_ellipsis): Wrap an option name in a string format message and fix GNU coding style. (build_over_call): Likewise. * class.c (check_field_decl): Likewise. (layout_nonempty_base_or_field): Likewise. * constexpr.c (cxx_eval_loop_expr): Likewise. * cvt.c (type_promotes_to): Likewise. * decl.c (cxx_init_decl_processing): Likewise. (mark_inline_variable): Likewise. (grokdeclarator): Likewise. * decl2.c (record_mangling): Likewise. * error.c (maybe_warn_cpp0x): Likewise. * except.c (doing_eh): Likewise. * mangle.c (maybe_check_abi_tags): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_userdef_numeric_literal): Likewise. (cp_parser_primary_expression): Likewise. (cp_parser_unqualified_id): Likewise. (cp_parser_pseudo_destructor_name): Likewise. (cp_parser_builtin_offsetof): Likewise. (cp_parser_lambda_expression): Likewise. (cp_parser_lambda_introducer): Likewise. (cp_parser_lambda_declarator_opt): Likewise. (cp_parser_selection_statement): Likewise. (cp_parser_init_statement): Likewise. (cp_parser_decomposition_declaration): Likewise. (cp_parser_function_specifier_opt): Likewise. (cp_parser_static_assert): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_namespace_definition): Likewise. (cp_parser_using_declaration): Likewise. (cp_parser_ctor_initializer_opt_and_function_body): Likewise. (cp_parser_initializer_list): Likewise. (cp_parser_type_parameter_key): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_try_block): Likewise. (cp_parser_std_attribute_spec): Likewise. (cp_parser_requires_clause_opt): Likewise. * pt.c (check_template_variable): Likewise. (check_default_tmpl_args): Likewise. (push_tinst_level_loc): Likewise. (instantiate_pending_templates): Likewise. (invalid_nontype_parm_type_p): Likewise. * repo.c (get_base_filename): Likewise. * rtti.c (typeid_ok_p): Likewise. (build_dynamic_cast_1): Likewise. * tree.c (maybe_warn_parm_abi): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * decl.c (match_record_decl): Wrap an option name in a string format message and fix GNU coding style. (gfc_match_pointer): Likewise. * expr.c (find_array_section): Likewise. * intrinsic.c (gfc_is_intrinsic): Likewise. * options.c (gfc_post_options): Likewise. * primary.c (match_integer_constant): Likewise. * trans-common.c (translate_common): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * lto-lang.c (lto_post_options): Wrap an option name in a string format message and fix GNU coding style. * lto-symtab.c (lto_symtab_merge_decls_2): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * g++.dg/conversion/simd3.C (foo): Wrap option names with apostrophe character. * g++.dg/cpp1z/decomp3.C (test): Likewise. (test3): Likewise. * g++.dg/cpp1z/decomp4.C (test): Likewise. * g++.dg/cpp1z/decomp44.C (foo): Likewise. * g++.dg/cpp1z/decomp45.C (f): Likewise. * g++.dg/opt/pr34036.C: Likewise. * g++.dg/spellcheck-c++-11-keyword.C: Likewise. * gcc.dg/c90-fordecl-1.c (foo): Likewise. * gcc.dg/cpp/dir-only-4.c: Likewise. * gcc.dg/cpp/dir-only-5.c: Likewise. * gcc.dg/cpp/pr71591.c: Likewise. * gcc.dg/format/opt-1.c: Likewise. * gcc.dg/format/opt-2.c: Likewise. * gcc.dg/format/opt-3.c: Likewise. * gcc.dg/format/opt-4.c: Likewise. * gcc.dg/format/opt-5.c: Likewise. * gcc.dg/format/opt-6.c: Likewise. * gcc.dg/pr22231.c: Likewise. * gcc.dg/pr33007.c: Likewise. * gcc.dg/simd-1.c (hanneke): Likewise. * gcc.dg/simd-5.c: Likewise. * gcc.dg/simd-6.c: Likewise. * gcc.dg/spellcheck-options-14.c: Likewise. * gcc.dg/spellcheck-options-15.c: Likewise. * gcc.dg/spellcheck-options-16.c: Likewise. * gcc.dg/spellcheck-options-17.c: Likewise. * gcc.dg/tree-ssa/pr23109.c: Likewise. * gcc.dg/tree-ssa/recip-5.c: Likewise. * gcc.target/i386/cet-notrack-1a.c (func): Likewise. (__attribute__): Likewise. * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. * gcc.target/powerpc/warn-1.c: Likewise. * gcc.target/powerpc/warn-2.c: Likewise. From-SVN: r269586
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog50
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/class.c7
-rw-r--r--gcc/cp/constexpr.c2
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/decl.c13
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/error.c32
-rw-r--r--gcc/cp/except.c2
-rw-r--r--gcc/cp/mangle.c8
-rw-r--r--gcc/cp/parser.c87
-rw-r--r--gcc/cp/pt.c16
-rw-r--r--gcc/cp/repo.c2
-rw-r--r--gcc/cp/rtti.c4
-rw-r--r--gcc/cp/tree.c10
15 files changed, 149 insertions, 93 deletions
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 <mliska@suse.cz>
+
+ * call.c (convert_arg_to_ellipsis): Wrap an option name
+ in a string format message and fix GNU coding style.
+ (build_over_call): Likewise.
+ * class.c (check_field_decl): Likewise.
+ (layout_nonempty_base_or_field): Likewise.
+ * constexpr.c (cxx_eval_loop_expr): Likewise.
+ * cvt.c (type_promotes_to): Likewise.
+ * decl.c (cxx_init_decl_processing): Likewise.
+ (mark_inline_variable): Likewise.
+ (grokdeclarator): Likewise.
+ * decl2.c (record_mangling): Likewise.
+ * error.c (maybe_warn_cpp0x): Likewise.
+ * except.c (doing_eh): Likewise.
+ * mangle.c (maybe_check_abi_tags): Likewise.
+ * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
+ (cp_parser_userdef_numeric_literal): Likewise.
+ (cp_parser_primary_expression): Likewise.
+ (cp_parser_unqualified_id): Likewise.
+ (cp_parser_pseudo_destructor_name): Likewise.
+ (cp_parser_builtin_offsetof): Likewise.
+ (cp_parser_lambda_expression): Likewise.
+ (cp_parser_lambda_introducer): Likewise.
+ (cp_parser_lambda_declarator_opt): Likewise.
+ (cp_parser_selection_statement): Likewise.
+ (cp_parser_init_statement): Likewise.
+ (cp_parser_decomposition_declaration): Likewise.
+ (cp_parser_function_specifier_opt): Likewise.
+ (cp_parser_static_assert): Likewise.
+ (cp_parser_simple_type_specifier): Likewise.
+ (cp_parser_namespace_definition): Likewise.
+ (cp_parser_using_declaration): Likewise.
+ (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
+ (cp_parser_initializer_list): Likewise.
+ (cp_parser_type_parameter_key): Likewise.
+ (cp_parser_member_declaration): Likewise.
+ (cp_parser_try_block): Likewise.
+ (cp_parser_std_attribute_spec): Likewise.
+ (cp_parser_requires_clause_opt): Likewise.
+ * pt.c (check_template_variable): Likewise.
+ (check_default_tmpl_args): Likewise.
+ (push_tinst_level_loc): Likewise.
+ (instantiate_pending_templates): Likewise.
+ (invalid_nontype_parm_type_p): Likewise.
+ * repo.c (get_base_filename): Likewise.
+ * rtti.c (typeid_ok_p): Likewise.
+ (build_dynamic_cast_1): Likewise.
+ * tree.c (maybe_warn_parm_abi): Likewise.
+
2019-03-08 Jakub Jelinek <jakub@redhat.com>
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),
"%<constexpr%> 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 "
- "%<virtual%> and %<constexpr%> only in -std=c++2a or "
- "-std=gnu++2a", dname);
+ "%<virtual%> and %<constexpr%> 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 %<auto%> "
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<T>::X". */
if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_CONSTEXPR])
inform (location, "C++11 %<constexpr%> 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 %<noexcept%> 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 %<thread_local%> 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, "%<concept%> only available with -fconcepts");
+ inform (location, "%<concept%> 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], "%<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, "%<if constexpr%> 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 %<for%> 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 %<for%> 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,
- "%<explicit(bool)%> only available with -std=c++2a "
- "or -std=gnu++2a");
+ "%<explicit(bool)%> 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 %<auto%> 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 %<auto%> 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 %<auto%> 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 %<constexpr%> 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 %<constexpr%> 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 %<class%> or %<typename%>");
@@ -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,
"%<try%> in %<constexpr%> 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,
- "%<requires%> only available with -fconcepts");
+ "%<requires%> 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 %<typeid%> with -fno-rtti");
+ error ("cannot use %<typeid%> 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 ("%<dynamic_cast%> not permitted with -fno-rtti");
+ error ("%<dynamic_cast%> 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");
}