]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans.c (check_inlining_for_nested_subprog): Quote reserved names.
authorMartin Sebor <msebor@redhat.com>
Fri, 17 May 2019 17:55:43 +0000 (17:55 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 17 May 2019 17:55:43 +0000 (11:55 -0600)
gcc/ada/ChangeLog:

        * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
        reserved names.

gcc/brig/ChangeLog:

        * brigfrontend/brig-control-handler.cc
        (brig_directive_control_handler::operator): Remove trailing newline
        from a diagnostic.
        * brigfrontend/brig-module-handler.cc
        (brig_directive_module_handler::operator): Remove a duplicated space
        from a diagnostic.

gcc/c/ChangeLog:

        * c-decl.c (start_decl): Quote keywords, operators, and
        types in diagnostics.
        (finish_decl): Same.
        * c-parser.c (c_parser_asm_statement): Same.
        (c_parser_conditional_expression): Same.
        (c_parser_transaction_cancel): Same.
        * c-typeck.c (c_common_type): Same.
        (build_conditional_expr): Same.
        (digest_init): Same.
        (process_init_element): Same.
        (build_binary_op): Same.

gcc/c-family/ChangeLog:

        * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
        keywords, operators, and types in diagnostics.
        (handle_scalar_storage_order_attribute): Same.
        (handle_mode_attribute): Same.
        (handle_visibility_attribute): Same.
        (handle_assume_aligned_attribute): Same.
        (handle_no_split_stack_attribute): Same.
        * c-common.c (shorten_compare): Same.
        (c_common_truthvalue_conversion): Same.
        (cb_get_source_date_epoch): Same.
        * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
        in diagnostics.
        (interpret_float): Same.
        * c-omp.c (c_finish_omp_for): Same.
        * c-opts.c (c_common_post_options): Same.
        * c-pch.c (c_common_pch_pragma): Same.
        * c-pragma.c (pop_alignment): Same.
        (handle_pragma_pack): Same.
        (apply_pragma_weak): Same.
        (handle_pragma_weak): Same.
        (handle_pragma_scalar_storage_order): Same.
        (handle_pragma_redefine_extname): Same.
        (add_to_renaming_pragma_list): Same.
        (maybe_apply_renaming_pragma): Same.
        (push_visibility): Same.
        (handle_pragma_visibility): Same.
        (handle_pragma_optimize): Same.
        (handle_pragma_message): Same.
        * c-warn.c (warn_for_omitted_condop): Same.
        (lvalue_error): Same.

gcc/cp/ChangeLog:

        * call.c (print_z_candidate): Wrap diagnostic text in a gettext
        macro.  Adjust.
        (print_z_candidates): Same.
        (build_conditional_expr_1): Quote keywords, operators, and types
        in diagnostics.
        (build_op_delete_call): Same.
        (maybe_print_user_conv_context): Wrap diagnostic text in a gettext
        macro.
        (convert_like_real): Same.
        (convert_arg_to_ellipsis): Quote keywords, operators, and types
        in diagnostics.
        (build_over_call): Same.
        (joust): Break up an overlong line.  Wrap diagnostic text in a gettext
        macro.
        * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English.
        (cxx_eval_constant_expression): Quote keywords, operators, and types
        in diagnostics.
        (potential_constant_expression_1): Same.
        * cp-gimplify.c (cp_genericize_r): Same.
        * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types
        in diagnostics.
        (type_promotes_to): Same.
        * decl.c (check_previous_goto_1): Same.
        (check_goto): Same.
        (start_decl): Same.
        (cp_finish_decl): Avoid parenthesizing a sentence for consistency.
        (grok_op_properties): Quote keywords, operators, and types
        in diagnostics.
        * decl2.c (grokfield): Same.
        (coerce_delete_type): Same.
        * except.c (is_admissible_throw_operand_or_catch_parameter): Same.
        * friend.c (do_friend): Quote C++ tokens.
        * init.c (build_new_1): Quote keywords, operators, and types
        in diagnostics.
        (build_vec_delete_1): Same.
        (build_delete): Same.
        * lex.c (parse_strconst_pragma): Same.
        (handle_pragma_implementation): Same.
        (unqualified_fn_lookup_error): Same.
        * mangle.c (write_type): Same.
        * method.c (defaulted_late_check): Avoid two consecutive punctuators.
        * name-lookup.c (cp_binding_level_debug): Remove a trailing newline.
        (pop_everything): Same.
        * parser.c (cp_lexer_start_debugging): Quote a macro name.
        in a diagnostic
        (cp_lexer_stop_debugging): Same.
        (cp_parser_userdef_numeric_literal): Quote a C++ header name
        in a diagnostic.
        (cp_parser_nested_name_specifier_opt): Quote keywords, operators,
        and types in diagnostics.
        (cp_parser_question_colon_clause): Same.
        (cp_parser_asm_definition): Same.
        (cp_parser_init_declarator): Same.
        (cp_parser_template_declaration_after_parameters): Avoid capitalizing
        a sentence in a diagnostic.
        (cp_parser_omp_declare_reduction): Quote keywords, operators, and types
        in diagnostics.
        (cp_parser_transaction): Same.
        * pt.c (maybe_process_partial_specialization): Replace second call
        to permerror with inform for consistency with other uses.
        (expand_integer_pack): Quote keywords, operators, and types
        in diagnostics.
        * rtti.c (get_typeid): Quote keywords, operators, and types
        in diagnostics.
        (build_dynamic_cast_1): Same.
        * semantics.c (finish_asm_stmt): Same.
        (finish_label_decl): Same.
        (finish_bases): Same.
        (finish_offsetof): Same.
        (cp_check_omp_declare_reduction): Same.
        (finish_decltype_type): Same.
        * tree.c (handle_init_priority_attribute): Same.  Add detail
        to diagnostics.
        (maybe_warn_zero_as_null_pointer_constant): Same.
        * typeck.c (cp_build_binary_op): Quote keywords, operators, and types
        in diagnostics.
        (cp_build_unary_op): Same.
        (check_for_casting_away_constness): Same.
        (build_static_cast): Same.
        (build_const_cast_1): Same.
        (maybe_warn_about_returning_address_of_local): Same.
        (check_return_expr): Same.
        * typeck2.c (abstract_virtuals_error_sfinae): Same.
        (digest_init_r): Replace a tab with spaces in a diagnostic.
        (build_functional_cast): Quote keywords, operators, and types
        in diagnostics.

gcc/d/ChangeLog:

        * d-builtins.cc (d_init_builtins): Quote keywords, operators,
        and types in diagnostics.
        * d-codegen.cc (get_array_length): Same.  Replace can't with cannot.
        * d-convert.cc (convert_expr): Same.
        * d-frontend.cc (getTypeInfoType): Quote an option name in
        a diagnostic.
        * d-lang.cc (d_handle_option): Same.
        (d_parse_file): Same.
        * decl.cc: Remove a trailing period from a diagnostic.
        * expr.cc: Use a directive for an apostrophe.
        * toir.cc: Quote keywords, operators, and types in diagnostics.
        * typeinfo.cc (build_typeinfo): Quote an option name in a diagnostic.

gcc/fortran/ChangeLog:

* gfortranspec.c (append_arg): Spell out the word "argument."

gcc/ChangeLog:

        * config/i386/i386-expand.c (get_element_number): Quote keywords
        and other internal names in diagnostics.  Adjust other diagnostic
        formatting issues noted by -Wformat-diag.
        * config/i386/i386-features.c
        (ix86_mangle_function_version_assembler_name): Same.
        * config/i386/i386-options.c (ix86_handle_abi_attribute): Same.
        * config/i386/i386.c (ix86_function_type_abi): Same.
        (ix86_function_ms_hook_prologue): Same.
        (classify_argument): Same.
        (ix86_expand_prologue): Same.
        (ix86_md_asm_adjust): Same.
        (ix86_memmodel_check): Same.

gcc/ChangeLog:

        * builtins.c (expand_builtin_atomic_always_lock_free): Quote
        identifiers, keywords, operators, and types in diagnostics.  Correct
        quoting, spelling, and sentence capitalization issues.
        (expand_builtin_atomic_is_lock_free): Same.
        (fold_builtin_next_arg): Same.
        * cfgexpand.c (expand_one_var): Same.
        (tree_conflicts_with_clobbers_p): Same.
        (expand_asm_stmt): Same.
        (verify_loop_structure): Same.
        * cgraphunit.c (process_function_and_variable_attributes): Same.
        * collect-utils.c (collect_execute): Same.
        * collect2.c (maybe_run_lto_and_relink): Same.
        (is_lto_object_file): Same.
        (scan_prog_file): Same.
        * convert.c (convert_to_real_1): Same.
        * dwarf2out.c (dwarf2out_begin_prologue): Same.
        * except.c (verify_eh_tree): Same.
        * gcc.c (execute): Same.
        (eval_spec_function): Same.
        (run_attempt): Same.
        (driver::set_up_specs): Same.
        (compare_debug_auxbase_opt_spec_function): Same.
        * gcov-tool.c (unlink_gcda_file): Same.
        (do_merge): Same.
        (do_rewrite): Same.
        * gcse.c (gcse_or_cprop_is_too_expensive): Same.
        * gimplify.c (gimplify_asm_expr): Same.
        (gimplify_adjust_omp_clauses): Same.
        * hsa-gen.c (gen_hsa_addr_insns): Same.
        (gen_hsa_insns_for_load): Same.
        (gen_hsa_cmp_insn_from_gimple): Same.
        (gen_hsa_insns_for_operation_assignment): Same.
        (gen_get_level): Same.
        (gen_hsa_alloca): Same.
        (omp_simple_builtin::generate): Same.
        (gen_hsa_atomic_for_builtin): Same.
        (gen_hsa_insns_for_call): Same.
        * input.c (dump_location_info): Same.
        * ipa-devirt.c (compare_virtual_tables): Same.
        * ira.c (ira_setup_eliminable_regset): Same.
        * lra-assigns.c (lra_assign): Same.
        * lra-constraints.c (lra_constraints): Same.
        * lto-streamer-in.c (lto_input_mode_table): Same.
        * lto-wrapper.c (get_options_from_collect_gcc_options): Same.
        (merge_and_complain): Same.
        (compile_offload_image): Same.
        (compile_images_for_offload_targets): Same.
        (debug_objcopy): Same.
        (run_gcc): Same.
        (main): Same.
        * opts.c (print_specific_help): Same.
        (parse_no_sanitize_attribute): Same.
        (print_help): Same.
        (handle_param): Same.
        * plugin.c (add_new_plugin): Same.
        (parse_plugin_arg_opt): Same.
        (try_init_one_plugin): Same.
        * print-rtl.c (debug_bb_n_slim): Quote identifiers, keywords,
        operators, and types in diagnostics.  Correct quoting and spelling
        issues.
        * read-rtl-function.c (parse_edge_flag_token): Same.
        (function_reader::parse_enum_value): Same.
        * reg-stack.c (check_asm_stack_operands): Same.
        * regcprop.c (validate_value_data): Same.
        * sched-rgn.c (make_pass_sched_fusion): Same.
        * stmt.c (check_unique_operand_names): Same.
        * targhooks.c (default_target_option_pragma_parse): Same.
        * tlink.c (recompile_files): Same.
        * toplev.c (process_options): Same.
        (do_compile): Same.
        * trans-mem.c (diagnose_tm_1): Same.
        (ipa_tm_scan_irr_block): Same.
        (ipa_tm_diagnose_transaction): Same.
        * tree-cfg.c (verify_address): Same.  Use get_tree_code_name to
        format a tree code name in a diagnostic.
        (verify_types_in_gimple_min_lval): Same.
        (verify_types_in_gimple_reference): Same.
        (verify_gimple_call): Same.
        (verify_gimple_assign_unary): Same.
        (verify_gimple_assign_binary): Same.
        (verify_gimple_assign_ternary): Same.
        (verify_gimple_assign_single): Same.
        (verify_gimple_switch): Same.
        (verify_gimple_label): Same.
        (verify_gimple_phi): Same.
        (verify_gimple_in_seq): Same.
        (verify_eh_throw_stmt_node): Same.
        (collect_subblocks): Same.
        (gimple_verify_flow_info): Same.
        (do_warn_unused_result): Same.
        * tree-inline.c (expand_call_inline): Same.
        * tree-into-ssa.c (update_ssa): Same.
        * tree.c (tree_int_cst_elt_check_failed): Same.
        (tree_vec_elt_check_failed): Same.
        (omp_clause_operand_check_failed): Same.
        (verify_type_variant): Same.
        (verify_type): Same.
        * value-prof.c (verify_histograms): Same.
        * varasm.c (assemble_start_function): Same.

gcc/lto/ChangeLog:

        * lto-dump.c (lto_main): Same.
        * lto.c (stream_out): Same.

gcc/objc/ChangeLog:

        * objc-act.c (objc_begin_catch_clause): Quote keywords and options
        in diagnostics.
        (objc_build_throw_stmt): Same.
        (objc_finish_message_expr): Same.
        (get_super_receiver): Same.
        * objc-next-runtime-abi-01.c (objc_next_runtime_abi_01_init): Spell
        out "less than" in English./
        * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Spell
        out "greater" in English.

gcc/testsuite/ChangeLog:

        * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics.
        * c-c++-common/Wvarargs-2.c: Same.
        * c-c++-common/Wvarargs.c: Same.
        * c-c++-common/pr51768.c: Same.
        * c-c++-common/tm/inline-asm.c: Same.
        * c-c++-common/tm/safe-1.c: Same.
        * g++.dg/asm-qual-1.C: Same.
        * g++.dg/asm-qual-3.C: Same.
        * g++.dg/conversion/dynamic1.C: Same.
        * g++.dg/cpp0x/constexpr-89599.C: Same.
        * g++.dg/cpp0x/constexpr-cast.C: Same.
        * g++.dg/cpp0x/constexpr-shift1.C: Same.
        * g++.dg/cpp0x/lambda/lambda-conv11.C: Same.
        * g++.dg/cpp0x/nullptr04.C: Same.
        * g++.dg/cpp0x/static_assert12.C: Same.
        * g++.dg/cpp0x/static_assert8.C: Same.
        * g++.dg/cpp1y/lambda-conv1.C: Same.
        * g++.dg/cpp1y/pr79393-3.C: Same.
        * g++.dg/cpp1y/static_assert1.C: Same.
        * g++.dg/cpp1z/constexpr-if4.C: Same.
        * g++.dg/cpp1z/constexpr-if5.C: Same.
        * g++.dg/cpp1z/constexpr-if9.C: Same.
        * g++.dg/eh/goto2.C: Same.
        * g++.dg/eh/goto3.C: Same.
        * g++.dg/expr/static_cast8.C: Same.
        * g++.dg/ext/flexary5.C: Same.
        * g++.dg/ext/utf-array-short-wchar.C: Same.
        * g++.dg/ext/utf-array.C: Same.
        * g++.dg/ext/utf8-2.C: Same.
        * g++.dg/gomp/loop-4.C: Same.
        * g++.dg/gomp/macro-4.C: Same.
        * g++.dg/gomp/udr-1.C: Same.
        * g++.dg/init/initializer-string-too-long.C: Same.
        * g++.dg/other/offsetof9.C: Same.
        * g++.dg/ubsan/pr63956.C: Same.
        * g++.dg/warn/Wbool-operation-1.C: Same.
        * g++.dg/warn/Wtype-limits-Wextra.C: Same.
        * g++.dg/warn/Wtype-limits.C: Same.
        * g++.dg/wrappers/pr88680.C: Same.
        * g++.old-deja/g++.mike/eh55.C: Same.
        * gcc.dg/Wsign-compare-1.c: Same.
        * gcc.dg/Wtype-limits-Wextra.c: Same.
        * gcc.dg/Wtype-limits.c: Same.
        * gcc.dg/Wunknownprag.c: Same.
        * gcc.dg/Wunsuffixed-float-constants-1.c: Same.
        * gcc.dg/asm-6.c: Same.
        * gcc.dg/asm-qual-1.c: Same.
        * gcc.dg/cast-1.c: Same.
        * gcc.dg/cast-2.c: Same.
        * gcc.dg/cast-3.c: Same.
        * gcc.dg/cpp/source_date_epoch-2.c: Same.
        * gcc.dg/debug/pr85252.c: Same.
        * gcc.dg/dfp/cast-bad.c: Same.
        * gcc.dg/format/gcc_diag-1.c: Same.
        * gcc.dg/format/gcc_diag-11.c: Same.New test.
        * gcc.dg/gcc_diag-11.c: Same.New test.
        * gcc.dg/gnu-cond-expr-2.c: Same.
        * gcc.dg/gnu-cond-expr-3.c: Same.
        * gcc.dg/gomp/macro-4.c: Same.
        * gcc.dg/init-bad-1.c: Same.
        * gcc.dg/init-bad-2.c: Same.
        * gcc.dg/init-bad-3.c: Same.
        * gcc.dg/pr27528.c: Same.
        * gcc.dg/pr48552-1.c: Same.
        * gcc.dg/pr48552-2.c: Same.
        * gcc.dg/pr59846.c: Same.
        * gcc.dg/pr61096-1.c: Same.
        * gcc.dg/pr8788-1.c: Same.
        * gcc.dg/pr90082.c: Same.
        * gcc.dg/simd-2.c: Same.
        * gcc.dg/spellcheck-params-2.c: Same.
        * gcc.dg/spellcheck-params.c: Same.
        * gcc.dg/strlenopt-49.c: Same.
        * gcc.dg/tm/pr52141.c: Same.
        * gcc.dg/torture/pr51106-1.c: Same.
        * gcc.dg/torture/pr51106-2.c: Same.
        * gcc.dg/utf-array-short-wchar.c: Same.
        * gcc.dg/utf-array.c: Same.
        * gcc.dg/utf8-2.c: Same.
        * gcc.dg/warn-sprintf-no-nul.c: Same.
        * gcc.target/i386/asm-flag-0.c: Same.
        * gcc.target/i386/inline_error.c: Same.
        * gcc.target/i386/pr30848.c: Same.
        * gcc.target/i386/pr39082-1.c: Same.
        * gcc.target/i386/pr39678.c: Same.
        * gcc.target/i386/pr57756.c: Same.
        * gcc.target/i386/pr68843-1.c: Same.
        * gcc.target/i386/pr79804.c: Same.
        * gcc.target/i386/pr82673.c: Same.
        * obj-c++.dg/class-protocol-1.mm: Same.
        * obj-c++.dg/exceptions-3.mm: Same.
        * obj-c++.dg/exceptions-4.mm: Same.
        * obj-c++.dg/exceptions-5.mm: Same.
        * obj-c++.dg/exceptions-6.mm: Same.
        * obj-c++.dg/method-12.mm: Same.
        * obj-c++.dg/method-13.mm: Same.
        * obj-c++.dg/method-6.mm: Same.
        * obj-c++.dg/method-7.mm: Same.
        * obj-c++.dg/method-9.mm: Same.
        * obj-c++.dg/method-lookup-1.mm: Same.
        * obj-c++.dg/proto-lossage-4.mm: Same.
        * obj-c++.dg/protocol-qualifier-2.mm: Same.
        * objc.dg/call-super-2.m: Same.
        * objc.dg/class-protocol-1.m: Same.
        * objc.dg/desig-init-1.m: Same.
        * objc.dg/exceptions-3.m: Same.
        * objc.dg/exceptions-4.m: Same.
        * objc.dg/exceptions-5.m: Same.
        * objc.dg/exceptions-6.m: Same.
        * objc.dg/method-19.m: Same.
        * objc.dg/method-2.m: Same.
        * objc.dg/method-5.m: Same.
        * objc.dg/method-6.m: Same.
        * objc.dg/method-7.m: Same.
        * objc.dg/method-lookup-1.m: Same.
        * objc.dg/proto-hier-1.m: Same.
        * objc.dg/proto-lossage-4.m: Same.

From-SVN: r271338

239 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c
gcc/brig/ChangeLog
gcc/brig/brigfrontend/brig-control-handler.cc
gcc/brig/brigfrontend/brig-module-handler.cc
gcc/builtins.c
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/c-family/c-common.c
gcc/c-family/c-lex.c
gcc/c-family/c-omp.c
gcc/c-family/c-opts.c
gcc/c-family/c-pch.c
gcc/c-family/c-pragma.c
gcc/c-family/c-warn.c
gcc/c-family/c.opt
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/cfgexpand.c
gcc/cgraphunit.c
gcc/collect-utils.c
gcc/collect2.c
gcc/config/aarch64/aarch64.c
gcc/config/i386/i386-expand.c
gcc/config/i386/i386-features.c
gcc/config/i386/i386-options.c
gcc/config/i386/i386.c
gcc/convert.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/constexpr.c
gcc/cp/cp-gimplify.c
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/except.c
gcc/cp/friend.c
gcc/cp/init.c
gcc/cp/lex.c
gcc/cp/mangle.c
gcc/cp/method.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/repo.c
gcc/cp/rtti.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/d/ChangeLog
gcc/d/d-builtins.cc
gcc/d/d-codegen.cc
gcc/d/d-convert.cc
gcc/d/d-frontend.cc
gcc/d/d-lang.cc
gcc/d/decl.cc
gcc/d/expr.cc
gcc/d/toir.cc
gcc/d/typeinfo.cc
gcc/dwarf2out.c
gcc/except.c
gcc/fortran/ChangeLog
gcc/fortran/gfortranspec.c
gcc/gcc.c
gcc/gcov-tool.c
gcc/gcse.c
gcc/ggc-common.c
gcc/ggc-page.c
gcc/gimplify.c
gcc/hsa-gen.c
gcc/input.c
gcc/ipa-devirt.c
gcc/ira.c
gcc/lra-assigns.c
gcc/lra-constraints.c
gcc/lto-streamer-in.c
gcc/lto-wrapper.c
gcc/lto/ChangeLog
gcc/lto/lto-dump.c
gcc/lto/lto.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/objc/objc-next-runtime-abi-01.c
gcc/objc/objc-next-runtime-abi-02.c
gcc/opts.c
gcc/passes.c
gcc/plugin.c
gcc/read-rtl-function.c
gcc/reg-stack.c
gcc/regcprop.c
gcc/reginfo.c
gcc/reload1.c
gcc/stmt.c
gcc/targhooks.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wbool-operation-1.c
gcc/testsuite/c-c++-common/Wvarargs-2.c
gcc/testsuite/c-c++-common/Wvarargs.c
gcc/testsuite/c-c++-common/convert-vec-1.c
gcc/testsuite/c-c++-common/pr51768.c
gcc/testsuite/c-c++-common/scal-to-vec1.c
gcc/testsuite/c-c++-common/tm/inline-asm.c
gcc/testsuite/c-c++-common/tm/safe-1.c
gcc/testsuite/g++.dg/asm-qual-1.C
gcc/testsuite/g++.dg/asm-qual-3.C
gcc/testsuite/g++.dg/conversion/dynamic1.C
gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C
gcc/testsuite/g++.dg/cpp0x/constexpr-cast.C
gcc/testsuite/g++.dg/cpp0x/constexpr-shift1.C
gcc/testsuite/g++.dg/cpp0x/defaulted18.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv11.C
gcc/testsuite/g++.dg/cpp0x/nullptr04.C
gcc/testsuite/g++.dg/cpp0x/static_assert12.C
gcc/testsuite/g++.dg/cpp0x/static_assert8.C
gcc/testsuite/g++.dg/cpp1y/lambda-conv1.C
gcc/testsuite/g++.dg/cpp1y/pr79393-3.C
gcc/testsuite/g++.dg/cpp1y/static_assert1.C
gcc/testsuite/g++.dg/cpp1z/constexpr-if4.C
gcc/testsuite/g++.dg/cpp1z/constexpr-if5.C
gcc/testsuite/g++.dg/cpp1z/constexpr-if9.C
gcc/testsuite/g++.dg/eh/goto2.C
gcc/testsuite/g++.dg/eh/goto3.C
gcc/testsuite/g++.dg/expr/static_cast8.C
gcc/testsuite/g++.dg/ext/flexary5.C
gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C
gcc/testsuite/g++.dg/ext/utf-array.C
gcc/testsuite/g++.dg/ext/utf8-2.C
gcc/testsuite/g++.dg/gomp/loop-4.C
gcc/testsuite/g++.dg/gomp/macro-4.C
gcc/testsuite/g++.dg/gomp/udr-1.C
gcc/testsuite/g++.dg/init/initializer-string-too-long.C
gcc/testsuite/g++.dg/other/offsetof9.C
gcc/testsuite/g++.dg/ubsan/pr63956.C
gcc/testsuite/g++.dg/warn/Wbool-operation-1.C
gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
gcc/testsuite/g++.dg/warn/Wtype-limits.C
gcc/testsuite/g++.dg/wrappers/pr88680.C
gcc/testsuite/g++.old-deja/g++.mike/eh55.C
gcc/testsuite/gcc.dg/Wsign-compare-1.c
gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c
gcc/testsuite/gcc.dg/Wtype-limits.c
gcc/testsuite/gcc.dg/Wunknownprag.c
gcc/testsuite/gcc.dg/Wunsuffixed-float-constants-1.c
gcc/testsuite/gcc.dg/asm-6.c
gcc/testsuite/gcc.dg/asm-qual-1.c
gcc/testsuite/gcc.dg/attr-assume_aligned-4.c
gcc/testsuite/gcc.dg/c90-const-expr-6.c
gcc/testsuite/gcc.dg/cast-1.c
gcc/testsuite/gcc.dg/cast-2.c
gcc/testsuite/gcc.dg/cast-3.c
gcc/testsuite/gcc.dg/cpp/source_date_epoch-2.c
gcc/testsuite/gcc.dg/debug/pr85252.c
gcc/testsuite/gcc.dg/dfp/cast-bad.c
gcc/testsuite/gcc.dg/gcc_diag-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gnu-cond-expr-2.c
gcc/testsuite/gcc.dg/gnu-cond-expr-3.c
gcc/testsuite/gcc.dg/gomp/macro-4.c
gcc/testsuite/gcc.dg/init-bad-1.c
gcc/testsuite/gcc.dg/init-bad-2.c
gcc/testsuite/gcc.dg/init-bad-3.c
gcc/testsuite/gcc.dg/parm-mismatch-1.c
gcc/testsuite/gcc.dg/pr27528.c
gcc/testsuite/gcc.dg/pr48552-1.c
gcc/testsuite/gcc.dg/pr48552-2.c
gcc/testsuite/gcc.dg/pr59846.c
gcc/testsuite/gcc.dg/pr61096-1.c
gcc/testsuite/gcc.dg/pr8788-1.c
gcc/testsuite/gcc.dg/pr90082.c
gcc/testsuite/gcc.dg/simd-1.c
gcc/testsuite/gcc.dg/simd-2.c
gcc/testsuite/gcc.dg/spellcheck-params-2.c
gcc/testsuite/gcc.dg/spellcheck-params.c
gcc/testsuite/gcc.dg/strlenopt-49.c
gcc/testsuite/gcc.dg/tm/pr52141.c
gcc/testsuite/gcc.dg/torture/pr51106-1.c
gcc/testsuite/gcc.dg/torture/pr51106-2.c
gcc/testsuite/gcc.dg/utf-array-short-wchar.c
gcc/testsuite/gcc.dg/utf-array.c
gcc/testsuite/gcc.dg/utf8-2.c
gcc/testsuite/gcc.dg/warn-sprintf-no-nul.c
gcc/testsuite/gcc.target/i386/asm-flag-0.c
gcc/testsuite/gcc.target/i386/inline_error.c
gcc/testsuite/gcc.target/i386/interrupt-6.c
gcc/testsuite/gcc.target/i386/interrupt-7.c
gcc/testsuite/gcc.target/i386/pr30848.c
gcc/testsuite/gcc.target/i386/pr39082-1.c
gcc/testsuite/gcc.target/i386/pr39678.c
gcc/testsuite/gcc.target/i386/pr57756.c
gcc/testsuite/gcc.target/i386/pr68843-1.c
gcc/testsuite/gcc.target/i386/pr79804.c
gcc/testsuite/gcc.target/i386/pr82673.c
gcc/testsuite/gnat.dg/inline3.adb
gcc/testsuite/gnat.dg/inline5.adb
gcc/testsuite/gnat.dg/inline7.adb
gcc/testsuite/gnat.dg/inline9.adb
gcc/testsuite/obj-c++.dg/class-protocol-1.mm
gcc/testsuite/obj-c++.dg/exceptions-3.mm
gcc/testsuite/obj-c++.dg/exceptions-4.mm
gcc/testsuite/obj-c++.dg/exceptions-5.mm
gcc/testsuite/obj-c++.dg/exceptions-6.mm
gcc/testsuite/obj-c++.dg/method-12.mm
gcc/testsuite/obj-c++.dg/method-13.mm
gcc/testsuite/obj-c++.dg/method-6.mm
gcc/testsuite/obj-c++.dg/method-7.mm
gcc/testsuite/obj-c++.dg/method-9.mm
gcc/testsuite/obj-c++.dg/method-lookup-1.mm
gcc/testsuite/obj-c++.dg/proto-lossage-4.mm
gcc/testsuite/obj-c++.dg/protocol-qualifier-2.mm
gcc/testsuite/objc.dg/call-super-2.m
gcc/testsuite/objc.dg/class-protocol-1.m
gcc/testsuite/objc.dg/desig-init-1.m
gcc/testsuite/objc.dg/exceptions-3.m
gcc/testsuite/objc.dg/exceptions-4.m
gcc/testsuite/objc.dg/exceptions-5.m
gcc/testsuite/objc.dg/exceptions-6.m
gcc/testsuite/objc.dg/method-19.m
gcc/testsuite/objc.dg/method-2.m
gcc/testsuite/objc.dg/method-5.m
gcc/testsuite/objc.dg/method-6.m
gcc/testsuite/objc.dg/method-7.m
gcc/testsuite/objc.dg/method-lookup-1.m
gcc/testsuite/objc.dg/proto-hier-1.m
gcc/testsuite/objc.dg/proto-lossage-4.m
gcc/testsuite/objc.dg/protocol-qualifier-2.m
gcc/tlink.c
gcc/toplev.c
gcc/trans-mem.c
gcc/tree-cfg.c
gcc/tree-inline.c
gcc/tree-into-ssa.c
gcc/tree.c
gcc/value-prof.c
gcc/varasm.c
libgcc/libgcov-util.c
libstdc++-v3/testsuite/20_util/any/misc/any_cast_neg.cc

index d89be8e2172898c004001804bad7d8f6b2a603a2..0b4e2455e7c67e0a636832e653c9dbe35327c22e 100644 (file)
@@ -1,3 +1,120 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * builtins.c (expand_builtin_atomic_always_lock_free): Quote
+        identifiers, keywords, operators, and types in diagnostics.  Correct
+        quoting, spelling, and sentence capitalization issues.
+        (expand_builtin_atomic_is_lock_free): Same.
+        (fold_builtin_next_arg): Same.
+        * cfgexpand.c (expand_one_var): Same.
+        (tree_conflicts_with_clobbers_p): Same.
+        (expand_asm_stmt): Same.
+        (verify_loop_structure): Same.
+        * cgraphunit.c (process_function_and_variable_attributes): Same.
+        * collect-utils.c (collect_execute): Same.
+        * collect2.c (maybe_run_lto_and_relink): Same.
+        (is_lto_object_file): Same.
+        (scan_prog_file): Same.
+        * convert.c (convert_to_real_1): Same.
+        * dwarf2out.c (dwarf2out_begin_prologue): Same.
+        * except.c (verify_eh_tree): Same.
+        * gcc.c (execute): Same.
+        (eval_spec_function): Same.
+        (run_attempt): Same.
+        (driver::set_up_specs): Same.
+        (compare_debug_auxbase_opt_spec_function): Same.
+        * gcov-tool.c (unlink_gcda_file): Same.
+        (do_merge): Same.
+        (do_rewrite): Same.
+        * gcse.c (gcse_or_cprop_is_too_expensive): Same.
+        * gimplify.c (gimplify_asm_expr): Same.
+        (gimplify_adjust_omp_clauses): Same.
+        * hsa-gen.c (gen_hsa_addr_insns): Same.
+        (gen_hsa_insns_for_load): Same.
+        (gen_hsa_cmp_insn_from_gimple): Same.
+        (gen_hsa_insns_for_operation_assignment): Same.
+        (gen_get_level): Same.
+        (gen_hsa_alloca): Same.
+        (omp_simple_builtin::generate): Same.
+        (gen_hsa_atomic_for_builtin): Same.
+        (gen_hsa_insns_for_call): Same.
+        * input.c (dump_location_info): Same.
+        * ipa-devirt.c (compare_virtual_tables): Same.
+        * ira.c (ira_setup_eliminable_regset): Same.
+        * lra-assigns.c (lra_assign): Same.
+        * lra-constraints.c (lra_constraints): Same.
+        * lto-streamer-in.c (lto_input_mode_table): Same.
+        * lto-wrapper.c (get_options_from_collect_gcc_options): Same.
+        (merge_and_complain): Same.
+        (compile_offload_image): Same.
+        (compile_images_for_offload_targets): Same.
+        (debug_objcopy): Same.
+        (run_gcc): Same.
+        (main): Same.
+        * opts.c (print_specific_help): Same.
+        (parse_no_sanitize_attribute): Same.
+        (print_help): Same.
+        (handle_param): Same.
+        * plugin.c (add_new_plugin): Same.
+        (parse_plugin_arg_opt): Same.
+        (try_init_one_plugin): Same.
+        * print-rtl.c (debug_bb_n_slim): Quote identifiers, keywords,
+        operators, and types in diagnostics.  Correct quoting and spelling
+        issues.
+        * read-rtl-function.c (parse_edge_flag_token): Same.
+        (function_reader::parse_enum_value): Same.
+        * reg-stack.c (check_asm_stack_operands): Same.
+        * regcprop.c (validate_value_data): Same.
+        * sched-rgn.c (make_pass_sched_fusion): Same.
+        * stmt.c (check_unique_operand_names): Same.
+        * targhooks.c (default_target_option_pragma_parse): Same.
+        * tlink.c (recompile_files): Same.
+        * toplev.c (process_options): Same.
+        (do_compile): Same.
+        * trans-mem.c (diagnose_tm_1): Same.
+        (ipa_tm_scan_irr_block): Same.
+        (ipa_tm_diagnose_transaction): Same.
+        * tree-cfg.c (verify_address): Same.  Use get_tree_code_name to
+        format a tree code name in a diagnostic.
+        (verify_types_in_gimple_min_lval): Same.
+        (verify_types_in_gimple_reference): Same.
+        (verify_gimple_call): Same.
+        (verify_gimple_assign_unary): Same.
+        (verify_gimple_assign_binary): Same.
+        (verify_gimple_assign_ternary): Same.
+        (verify_gimple_assign_single): Same.
+        (verify_gimple_switch): Same.
+        (verify_gimple_label): Same.
+        (verify_gimple_phi): Same.
+        (verify_gimple_in_seq): Same.
+        (verify_eh_throw_stmt_node): Same.
+        (collect_subblocks): Same.
+        (gimple_verify_flow_info): Same.
+        (do_warn_unused_result): Same.
+        * tree-inline.c (expand_call_inline): Same.
+        * tree-into-ssa.c (update_ssa): Same.
+        * tree.c (tree_int_cst_elt_check_failed): Same.
+        (tree_vec_elt_check_failed): Same.
+        (omp_clause_operand_check_failed): Same.
+        (verify_type_variant): Same.
+        (verify_type): Same.
+        * value-prof.c (verify_histograms): Same.
+        * varasm.c (assemble_start_function): Same.
+
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * config/i386/i386-expand.c (get_element_number): Quote keywords
+        and other internal names in diagnostics.  Adjust other diagnostic
+        formatting issues noted by -Wformat-diag.
+        * config/i386/i386-features.c
+        (ix86_mangle_function_version_assembler_name): Same.
+        * config/i386/i386-options.c (ix86_handle_abi_attribute): Same.
+        * config/i386/i386.c (ix86_function_type_abi): Same.
+        (ix86_function_ms_hook_prologue): Same.
+        (classify_argument): Same.
+        (ix86_expand_prologue): Same.
+        (ix86_md_asm_adjust): Same.
+        (ix86_memmodel_check): Same.
+
 2019-05-17  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>
 
        * config/mips/mips.c (mips_dwarf_frame_reg_mode): Replace
index 9116b923de5bc96623ba41fb76b2058b51eb25bf..ccea2b9b26fe523a0daec7ac4792c92cad991b36 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
+        reserved names.
+
 2019-05-08  Arnaud Charlet  <charlet@adacore.com>
 
        * standard.ads.h: New file.
index 155cb4b27abc3ac6063c4f630b400714c244b258..932a54ca111af12595255759edb6c96aabc2e580 100644 (file)
@@ -2024,12 +2024,13 @@ check_inlining_for_nested_subprog (tree fndecl)
 
       if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (parent_decl)))
        {
-         error_at (loc1, "subprogram %q+F not marked Inline_Always", fndecl);
+         error_at (loc1, "subprogram %q+F not marked %<Inline_Always%>",
+                   fndecl);
          error_at (loc2, "parent subprogram cannot be inlined");
        }
       else
        {
-         warning_at (loc1, OPT_Winline, "subprogram %q+F not marked Inline",
+         warning_at (loc1, OPT_Winline, "subprogram %q+F not marked %<Inline%>",
                      fndecl);
          warning_at (loc2, OPT_Winline, "parent subprogram cannot be inlined");
        }
index a1cc326274fedd01b89872773f4b13f9fc699d99..1fdc0f15ba6ea03a47dffd9b5f13048fa41976a8 100644 (file)
@@ -1,3 +1,12 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * brigfrontend/brig-control-handler.cc
+        (brig_directive_control_handler::operator): Remove trailing newline
+        from a diagnostic.
+        * brigfrontend/brig-module-handler.cc
+        (brig_directive_module_handler::operator): Remove a duplicated space
+        from a diagnostic.
+
 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
 
        Update copyright years.
index 38039315c7ca18a0a1da078def95579d619eda22..4374c469a39a535c4432d735ddd3e22aff756855 100644 (file)
@@ -102,7 +102,7 @@ brig_directive_control_handler::operator () (const BrigBase *base)
       /* Unimplemented.  */
       break;
     default:
-      sorry ("Unsupported control directive %x.\n", inst->control);
+      sorry ("Unsupported control directive %x.", inst->control);
     }
   return base->byteCount;
 }
index 58a65d6557448d3d66ac8655fc60cffb771cd5a3..e1551b93812ff5f0003f6324356d53774db15393 100644 (file)
@@ -28,10 +28,10 @@ brig_directive_module_handler::operator () (const BrigBase *base)
   const BrigDirectiveModule* mod = (const BrigDirectiveModule*)base;
   m_parent.m_module_name = m_parent.get_string (mod->name).substr (1);
   if (mod->hsailMajor != 1 || mod->hsailMinor != 0)
-    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE " "
+    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE
                 "HSAIL version not supported. HSAIL 1.0 required.");
   if (mod->machineModel != BRIG_MACHINE_LARGE)
-    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE " "
+    fatal_error (UNKNOWN_LOCATION, PHSA_ERROR_PREFIX_INCOMPATIBLE_MODULE
                 "Only HSA 'large' machine model supported.");
   /* Do not check for the profile as the runtime conformance suite tests
      with 'full' profile BRIGs even though they don't use any full profile
index d37d73fc4a0fdd9ff0883ea3adfb385775a8a684..0456a9ef646b83f37d3d6dc3b09b1ef22df05c32 100644 (file)
@@ -6784,7 +6784,7 @@ expand_builtin_atomic_always_lock_free (tree exp)
 
   if (TREE_CODE (arg0) != INTEGER_CST)
     {
-      error ("non-constant argument 1 to __atomic_always_lock_free");
+      error ("non-constant argument 1 to %qs", "__atomic_always_lock_free");
       return const0_rtx;
     }
 
@@ -6826,7 +6826,7 @@ expand_builtin_atomic_is_lock_free (tree exp)
 
   if (!INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
     {
-      error ("non-integer argument 1 to __atomic_is_lock_free");
+      error ("non-integer argument 1 to %qs", "__atomic_is_lock_free");
       return NULL_RTX;
     }
 
@@ -10224,7 +10224,7 @@ fold_builtin_next_arg (tree exp, bool va_start_p)
 
   if (!stdarg_p (fntype))
     {
-      error ("%<va_start%> used in function with fixed args");
+      error ("%<va_start%> used in function with fixed arguments");
       return true;
     }
 
index b005b810f43c614513122501467569a9e3720882..47c1d3d51f50e7889bda3e2924f52fcb6e3c7ab5 100644 (file)
@@ -1,3 +1,36 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
+        keywords, operators, and types in diagnostics.
+        (handle_scalar_storage_order_attribute): Same.
+        (handle_mode_attribute): Same.
+        (handle_visibility_attribute): Same.
+        (handle_assume_aligned_attribute): Same.
+        (handle_no_split_stack_attribute): Same.
+        * c-common.c (shorten_compare): Same.
+        (c_common_truthvalue_conversion): Same.
+        (cb_get_source_date_epoch): Same.
+        * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
+        in diagnostics.
+        (interpret_float): Same.
+        * c-omp.c (c_finish_omp_for): Same.
+        * c-opts.c (c_common_post_options): Same.
+        * c-pch.c (c_common_pch_pragma): Same.
+        * c-pragma.c (pop_alignment): Same.
+        (handle_pragma_pack): Same.
+        (apply_pragma_weak): Same.
+        (handle_pragma_weak): Same.
+        (handle_pragma_scalar_storage_order): Same.
+        (handle_pragma_redefine_extname): Same.
+        (add_to_renaming_pragma_list): Same.
+        (maybe_apply_renaming_pragma): Same.
+        (push_visibility): Same.
+        (handle_pragma_visibility): Same.
+        (handle_pragma_optimize): Same.
+        (handle_pragma_message): Same.
+        * c-warn.c (warn_for_omitted_condop): Same.
+        (lvalue_error): Same.
+
 2019-05-15  Richard Biener  <rguenther@suse.de>
 
        PR c/90474
index 93b210eed9ca004a7f9b7fc3e24134bd5c04957a..12c0b9bfb54363398f1ecab84b22384583c53582 100644 (file)
@@ -891,7 +891,7 @@ handle_no_sanitize_attribute (tree *node, tree name, tree args, int,
       tree id = TREE_VALUE (args);
       if (TREE_CODE (id) != STRING_CST)
        {
-         error ("no_sanitize argument not a string");
+         error ("%qE argument not a string", name);
          return NULL_TREE;
        }
 
@@ -1418,8 +1418,8 @@ handle_scalar_storage_order_attribute (tree *node, tree name, tree args,
 
   if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
     {
-      error ("scalar_storage_order is not supported because endianness "
-           "is not uniform");
+      error ("%qE attribute is not supported because endianness is not uniform",
+            name);
       return NULL_TREE;
     }
 
@@ -1435,8 +1435,8 @@ handle_scalar_storage_order_attribute (tree *node, tree name, tree args,
        reverse = BYTES_BIG_ENDIAN;
       else
        {
-         error ("scalar_storage_order argument must be one of \"big-endian\""
-                " or \"little-endian\"");
+         error ("attribute %qE argument must be one of %qs or %qs",
+                name, "big-endian", "little-endian");
          return NULL_TREE;
        }
 
@@ -1759,9 +1759,9 @@ handle_mode_attribute (tree *node, tree name, tree args,
        case MODE_VECTOR_ACCUM:
        case MODE_VECTOR_UACCUM:
          warning (OPT_Wattributes, "specifying vector types with "
-                  "__attribute__ ((mode)) is deprecated");
-         warning (OPT_Wattributes,
-                  "use __attribute__ ((vector_size)) instead");
+                  "%<__attribute__ ((mode))%> is deprecated");
+         inform (input_location,
+                 "use %<__attribute__ ((vector_size))%> instead");
          valid_mode = vector_mode_valid_p (mode);
          break;
 
@@ -2671,7 +2671,8 @@ handle_visibility_attribute (tree *node, tree name, tree args,
     vis = VISIBILITY_PROTECTED;
   else
     {
-      error ("visibility argument must be one of \"default\", \"hidden\", \"protected\" or \"internal\"");
+      error ("attribute %qE argument must be one of %qs, %qs, %qs, or %qs",
+            name, "default", "hidden", "protected", "internal");
       vis = VISIBILITY_DEFAULT;
     }
 
@@ -2935,8 +2936,8 @@ handle_assume_aligned_attribute (tree *node, tree name, tree args, int,
          /* The misalignment specified by the second argument
             must be non-negative and less than the alignment.  */
          warning (OPT_Wattributes,
-                  "%qE attribute argument %E is not in the range [0, %E)",
-                  name, val, align);
+                  "%qE attribute argument %E is not in the range [0, %wu]",
+                  name, val, tree_to_uhwi (align) - 1);
          *no_add_attrs = true;
          return NULL_TREE;
        }
@@ -3083,7 +3084,7 @@ handle_no_limit_stack_attribute (tree *node, tree name,
   else if (DECL_INITIAL (decl))
     {
       error_at (DECL_SOURCE_LOCATION (decl),
-               "can%'t set %qE attribute after definition", name);
+               "cannot set %qE attribute after definition", name);
       *no_add_attrs = true;
     }
   else
@@ -3974,7 +3975,7 @@ handle_no_split_stack_attribute (tree *node, tree name,
   else if (DECL_INITIAL (decl))
     {
       error_at (DECL_SOURCE_LOCATION (decl),
-               "can%'t set %qE attribute after definition", name);
+               "cannot set %qE attribute after definition", name);
       *no_add_attrs = true;
     }
 
@@ -3985,13 +3986,13 @@ handle_no_split_stack_attribute (tree *node, tree name,
    struct attribute_spec.handler.  */
 
 static tree
-handle_returns_nonnull_attribute (tree *node, tree, tree, int,
+handle_returns_nonnull_attribute (tree *node, tree name, tree, int,
                                  bool *no_add_attrs)
 {
   // Even without a prototype we still have a return type we can check.
   if (TREE_CODE (TREE_TYPE (*node)) != POINTER_TYPE)
     {
-      error ("returns_nonnull attribute on a function not returning a pointer");
+      error ("%qE attribute on a function not returning a pointer", name);
       *no_add_attrs = true;
     }
   return NULL_TREE;
index 37d10cced0f5d5db3b24861ed0d8518fd390985a..10ae91e427ffd9375bf1f2b18ea6c3bdf6f5a7a5 100644 (file)
@@ -3063,14 +3063,16 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr,
            case GE_EXPR:
              if (warn)
                warning_at (loc, OPT_Wtype_limits,
-                           "comparison of unsigned expression >= 0 is always true");
+                           "comparison of unsigned expression in %<>= 0%> "
+                           "is always true");
              value = truthvalue_true_node;
              break;
 
            case LT_EXPR:
              if (warn)
                warning_at (loc, OPT_Wtype_limits,
-                           "comparison of unsigned expression < 0 is always false");
+                           "comparison of unsigned expression in %<< 0%> "
+                           "is always false");
              value = truthvalue_false_node;
              break;
 
@@ -3379,7 +3381,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
       if (TREE_CODE (TREE_TYPE (expr)) == INTEGER_TYPE
          && !TYPE_UNSIGNED (TREE_TYPE (expr)))
        warning_at (EXPR_LOCATION (expr), OPT_Wint_in_bool_context,
-                   "%<<<%> in boolean context, did you mean %<<%> ?");
+                   "%<<<%> in boolean context, did you mean %<<%>?");
       break;
 
     case COND_EXPR:
@@ -3395,7 +3397,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
              && (!integer_onep (val1)
                  || !integer_onep (val2)))
            warning_at (EXPR_LOCATION (expr), OPT_Wint_in_bool_context,
-                       "?: using integer constants in boolean context, "
+                       "%<?:%> using integer constants in boolean context, "
                        "the expression will always evaluate to %<true%>");
          else if ((TREE_CODE (val1) == INTEGER_CST
                    && !integer_zerop (val1)
@@ -3404,7 +3406,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
                       && !integer_zerop (val2)
                       && !integer_onep (val2)))
            warning_at (EXPR_LOCATION (expr), OPT_Wint_in_bool_context,
-                       "?: using integer constants in boolean context");
+                       "%<?:%> using integer constants in boolean context");
        }
       /* Distribute the conversion into the arms of a COND_EXPR.  */
       if (c_dialect_cxx ())
@@ -8259,9 +8261,9 @@ cb_get_source_date_epoch (cpp_reader *pfile ATTRIBUTE_UNUSED)
   if (errno != 0 || endptr == source_date_epoch || *endptr != '\0'
       || epoch < 0 || epoch > MAX_SOURCE_DATE_EPOCH)
     {
-      error_at (input_location, "environment variable SOURCE_DATE_EPOCH must "
+      error_at (input_location, "environment variable %qs must "
                "expand to a non-negative integer less than or equal to %wd",
-               MAX_SOURCE_DATE_EPOCH);
+               "SOURCE_DATE_EPOCH", MAX_SOURCE_DATE_EPOCH);
       return (time_t) -1;
     }
 
index 0a368a33a5839fedab872850d14e4fdf3268b457..851fd704e5d37a7b0bffee7064cfa2d20c51c7f5 100644 (file)
@@ -258,7 +258,7 @@ cb_def_pragma (cpp_reader *pfile, location_t loc)
            name = cpp_token_as_text (pfile, s);
        }
 
-      warning_at (fe_loc, OPT_Wunknown_pragmas, "ignoring #pragma %s %s",
+      warning_at (fe_loc, OPT_Wunknown_pragmas, "ignoring %<#pragma %s %s%>",
                  space, name);
     }
 }
@@ -818,7 +818,7 @@ interpret_float (const cpp_token *token, unsigned int flags,
       if (((flags & CPP_N_HEX) == 0) && ((flags & CPP_N_IMAGINARY) == 0))
        {
          warning (OPT_Wunsuffixed_float_constants,
-                  "unsuffixed float constant");
+                  "unsuffixed floating constant");
          if (float_const_decimal64_p ())
            flags |= CPP_N_DFLOAT;
        }
index 16e71981887193bb5b19df6387cc776cbe4571da..5645e9d4fda9fb0fbdfa1c583cce0752deb4fe14 100644 (file)
@@ -974,7 +974,7 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
                                {
                                  error_at (elocus,
                                            "increment is not constant 1 or "
-                                           "-1 for != condition");
+                                           "-1 for %<!=%> condition");
                                  fail = true;
                                }
                            }
@@ -992,7 +992,7 @@ c_finish_omp_for (location_t locus, enum tree_code code, tree declv,
                        {
                          error_at (elocus,
                                    "increment is not constant 1 or -1 for"
-                                   " != condition");
+                                   " %<!=%> condition");
                          fail = true;
                        }
                    }
index bc7ea1769096d921f3a93a86368f72dc9b489e81..954b6a494f85b900a185a458b859cf7bfc441ad7 100644 (file)
@@ -1022,8 +1022,8 @@ c_common_post_options (const char **pfilename)
     warn_return_type = 1;
 
   if (num_in_fnames > 1)
-    error ("too many filenames given.  Type %s --help for usage",
-          progname);
+    error ("too many filenames given; type %<%s %s%> for usage",
+          progname, "--help");
 
   if (flag_preprocess_only)
     {
@@ -1057,7 +1057,7 @@ c_common_post_options (const char **pfilename)
             debug formats we warn here and refuse to load any PCH files.  */
          if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG)
            warning (OPT_Wdeprecated,
-                    "the \"%s\" debug format cannot be used with "
+                    "the %qs debug format cannot be used with "
                     "pre-compiled headers", debug_type_names[write_symbols]);
        }
       else if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG)
index 316fb84f429a2c3f19710db8d4a850f80e14fd2f..2024ae2f8c3235ecbfa0280130f6dc1396df3323 100644 (file)
@@ -103,7 +103,7 @@ pch_init (void)
 
   f = fopen (pch_file, "w+b");
   if (f == NULL)
-    fatal_error (input_location, "can%'t create precompiled header %s: %m",
+    fatal_error (input_location, "cannot create precompiled header %s: %m",
                 pch_file);
   pch_outfile = f;
 
@@ -124,7 +124,7 @@ pch_init (void)
       || fwrite (executable_checksum, 16, 1, f) != 1
       || fwrite (&v, sizeof (v), 1, f) != 1
       || fwrite (target_validity, v.target_data_length, 1, f) != 1)
-    fatal_error (input_location, "can%'t write to %s: %m", pch_file);
+    fatal_error (input_location, "cannot write to %s: %m", pch_file);
 
   /* Let the debugging format deal with the PCHness.  */
   (*debug_hooks->handle_pch) (0);
@@ -182,7 +182,7 @@ c_common_write_pch (void)
 
   if (fseek (pch_outfile, 0, SEEK_SET) != 0
       || fwrite (get_ident (), IDENT_LENGTH, 1, pch_outfile) != 1)
-    fatal_error (input_location, "can%'t write %s: %m", pch_file);
+    fatal_error (input_location, "cannot write %s: %m", pch_file);
 
   fclose (pch_outfile);
 
@@ -208,7 +208,7 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
 
   sizeread = read (fd, ident, IDENT_LENGTH + 16);
   if (sizeread == -1)
-    fatal_error (input_location, "can%'t read %s: %m", name);
+    fatal_error (input_location, "cannot read %s: %m", name);
   else if (sizeread != IDENT_LENGTH + 16)
     {
       if (cpp_get_options (pfile)->warn_invalid_pch)
@@ -249,7 +249,7 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
      executable, so it ought to be long enough that we can read a
      c_pch_validity structure.  */
   if (read (fd, &v, sizeof (v)) != sizeof (v))
-    fatal_error (input_location, "can%'t read %s: %m", name);
+    fatal_error (input_location, "cannot read %s: %m", name);
 
   /* The allowable debug info combinations are that either the PCH file
      was built with the same as is being used now, or the PCH file was
@@ -300,7 +300,7 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
 
     if ((size_t) read (fd, this_file_data, v.target_data_length)
        != v.target_data_length)
-      fatal_error (input_location, "can%'t read %s: %m", name);
+      fatal_error (input_location, "cannot read %s: %m", name);
     msg = targetm.pch_valid_p (this_file_data, v.target_data_length);
     free (this_file_data);
     if (msg != NULL)
@@ -406,9 +406,9 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name)
 
   if (!cpp_get_options (pfile)->preprocessed)
     {
-      error ("pch_preprocess pragma should only be used "
+      error ("%<pch_preprocess%> pragma should only be used "
             "with %<-fpreprocessed%>");
-      inform (input_location, "use #include instead");
+      inform (input_location, "use %<#include%> instead");
       return;
     }
 
index 6b8ada59460558b99d6b1ceaf4f41049f5852228..480d98efd1ec85ca954f8c00ab09a45dd8892761 100644 (file)
@@ -91,7 +91,8 @@ pop_alignment (tree id)
   align_stack * entry;
 
   if (alignment_stack == NULL)
-    GCC_BAD ("#pragma pack (pop) encountered without matching #pragma pack (push)");
+    GCC_BAD ("%<#pragma pack (pop)%> encountered without matching "
+            "%<#pragma pack (push)%>");
 
   /* If we got an identifier, strip away everything above the target
      entry so that the next step will restore the state just below it.  */
@@ -104,8 +105,9 @@ pop_alignment (tree id)
            break;
          }
       if (entry == NULL)
-       warning (OPT_Wpragmas, "\
-#pragma pack(pop, %E) encountered without matching #pragma pack(push, %E)"
+       warning (OPT_Wpragmas,
+                "%<#pragma pack(pop, %E)%> encountered without matching "
+                "%<#pragma pack(push, %E)%>"
                 , id, id);
     }
 
@@ -197,7 +199,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)
@@ -257,7 +259,7 @@ apply_pragma_weak (tree decl, tree value)
       && !DECL_WEAK (decl) /* Don't complain about a redundant #pragma.  */
       && DECL_ASSEMBLER_NAME_SET_P (decl)
       && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
-    warning (OPT_Wpragmas, "applying #pragma weak %q+D after first use "
+    warning (OPT_Wpragmas, "applying %<#pragma weak %+D%> after first use "
             "results in unspecified behavior", decl);
 
   declare_weak (decl);
@@ -354,12 +356,12 @@ handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
   value = 0;
 
   if (pragma_lex (&name) != CPP_NAME)
-    GCC_BAD ("malformed #pragma weak, ignored");
+    GCC_BAD ("malformed %<#pragma weak%>, ignored");
   t = pragma_lex (&x);
   if (t == CPP_EQ)
     {
       if (pragma_lex (&value) != CPP_NAME)
-       GCC_BAD ("malformed #pragma weak, ignored");
+       GCC_BAD ("%<malformed #pragma weak%>, ignored");
       t = pragma_lex (&x);
     }
   if (t != CPP_EOF)
@@ -417,7 +419,7 @@ handle_pragma_scalar_storage_order (cpp_reader *ARG_UNUSED(dummy))
 
   if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
     {
-      error ("scalar_storage_order is not supported because endianness "
+      error ("%<scalar_storage_order%> is not supported because endianness "
             "is not uniform");
       return;
     }
@@ -495,9 +497,9 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy))
   bool found;
 
   if (pragma_lex (&oldname) != CPP_NAME)
-    GCC_BAD ("malformed #pragma redefine_extname, ignored");
+    GCC_BAD ("malformed %<#pragma redefine_extname%>, ignored");
   if (pragma_lex (&newname) != CPP_NAME)
-    GCC_BAD ("malformed #pragma redefine_extname, ignored");
+    GCC_BAD ("malformed %<#pragma redefine_extname%>, ignored");
   t = pragma_lex (&x);
   if (t != CPP_EOF)
     warning (OPT_Wpragmas, "junk at end of %<#pragma redefine_extname%>");
@@ -528,8 +530,8 @@ handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy))
              name = targetm.strip_name_encoding (name);
 
              if (!id_equal (newname, name))
-               warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
-                        "conflict with previous rename");
+               warning (OPT_Wpragmas, "%<#pragma redefine_extname%> "
+                        "ignored due to conflict with previous rename");
            }
          else
            symtab->change_decl_assembler_name (decl, newname);
@@ -556,8 +558,8 @@ add_to_renaming_pragma_list (tree oldname, tree newname)
     if (oldname == p->oldname)
       {
        if (p->newname != newname)
-         warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
-                  "conflict with previous #pragma redefine_extname");
+         warning (OPT_Wpragmas, "%<#pragma redefine_extname%> ignored due to "
+                  "conflict with previous %<#pragma redefine_extname%>");
        return;
       }
 
@@ -592,7 +594,7 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
       oldname = targetm.strip_name_encoding (oldname);
 
       if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldname))
-         warning (OPT_Wpragmas, "asm declaration ignored due to "
+         warning (OPT_Wpragmas, "%<asm%> declaration ignored due to "
                   "conflict with previous rename");
 
       /* Take any pending redefine_extname off the list.  */
@@ -601,8 +603,8 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
          {
            /* Only warn if there is a conflict.  */
            if (!id_equal (p->newname, oldname))
-             warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
-                      "conflict with previous rename");
+             warning (OPT_Wpragmas, "%<#pragma redefine_extname%> ignored "
+                      "due to conflict with previous rename");
 
            pending_redefine_extname->unordered_remove (ix);
            break;
@@ -623,8 +625,8 @@ maybe_apply_renaming_pragma (tree decl, tree asmname)
          {
            if (strcmp (TREE_STRING_POINTER (asmname),
                        IDENTIFIER_POINTER (newname)) != 0)
-             warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
-                      "conflict with __asm__ declaration");
+             warning (OPT_Wpragmas, "%<#pragma redefine_extname%> ignored "
+                      "due to conflict with %<asm%> declaration");
            return asmname;
          }
 
@@ -684,7 +686,8 @@ push_visibility (const char *str, int kind)
   else if (!strcmp (str, "protected"))
     default_visibility = VISIBILITY_PROTECTED;
   else
-    GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
+    GCC_BAD ("%<#pragma GCC visibility push()%> must specify %<default%>, "
+            "%<internal%>, %<hidden%> or %<protected%>");
   visibility_options.inpragma = 1;
 }
 
@@ -726,7 +729,8 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
        action = pop;
     }
   if (bad == action)
-    GCC_BAD ("#pragma GCC visibility must be followed by push or pop");
+    GCC_BAD ("%<#pragma GCC visibility%> must be followed by %<push%> "
+            "or %<pop%>");
   else
     {
       if (pop == action)
@@ -740,7 +744,7 @@ handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
            GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
          token = pragma_lex (&x);
          if (token != CPP_NAME)
-           GCC_BAD ("malformed #pragma GCC visibility push");
+           GCC_BAD ("malformed %<#pragma GCC visibility push%>");
          else
            push_visibility (IDENTIFIER_POINTER (x), 0);
          if (pragma_lex (&x) != CPP_CLOSE_PAREN)
@@ -860,7 +864,7 @@ handle_pragma_target(cpp_reader *ARG_UNUSED(dummy))
 
   if (cfun)
     {
-      error ("#pragma GCC option is not allowed inside functions");
+      error ("%<#pragma GCC option%> is not allowed inside functions");
       return;
     }
 
@@ -906,7 +910,7 @@ handle_pragma_target(cpp_reader *ARG_UNUSED(dummy))
 
       if (token != CPP_EOF)
        {
-         error ("#pragma GCC target string... is badly formed");
+         error ("%<#pragma GCC target%> string is badly formed");
          return;
        }
 
@@ -929,7 +933,7 @@ handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy))
 
   if (cfun)
     {
-      error ("#pragma GCC optimize is not allowed inside functions");
+      error ("%<#pragma GCC optimize%> is not allowed inside functions");
       return;
     }
 
@@ -974,7 +978,7 @@ handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy))
 
       if (token != CPP_EOF)
        {
-         error ("#pragma GCC optimize string... is badly formed");
+         error ("%<#pragma GCC optimize%> string is badly formed");
          return;
        }
 
@@ -1147,7 +1151,8 @@ handle_pragma_message (cpp_reader *ARG_UNUSED(dummy))
     warning (OPT_Wpragmas, "junk at end of %<#pragma message%>");
 
   if (TREE_STRING_LENGTH (message) > 1)
-    inform (input_location, "#pragma message: %s", TREE_STRING_POINTER (message));
+    inform (input_location, "%<#pragma message: %s%>",
+           TREE_STRING_POINTER (message));
 }
 
 /* Mark whether the current location is valid for a STDC pragma.  */
index f95eba96a70bb7cb2b54440e889e7e9d0b23996a..fa7b6ddea555bcc2b810757ee61bb9c5bfe3d033 100644 (file)
@@ -1663,7 +1663,7 @@ warn_for_omitted_condop (location_t location, tree cond)
       || (TREE_TYPE (cond) != NULL_TREE
          && TREE_CODE (TREE_TYPE (cond)) == BOOLEAN_TYPE))
       warning_at (location, OPT_Wparentheses,
-               "the omitted middle operand in ?: will always be %<true%>, "
+               "the omitted middle operand in %<?:%> will always be %<true%>, "
                "suggest explicit middle operand");
 }
 
@@ -1762,7 +1762,7 @@ lvalue_error (location_t loc, enum lvalue_use use)
       error_at (loc, "lvalue required as unary %<&%> operand");
       break;
     case lv_asm:
-      error_at (loc, "lvalue required in asm statement");
+      error_at (loc, "lvalue required in %<asm%> statement");
       break;
     default:
       gcc_unreachable ();
index 916cc67b453ff47bf4865f2cb31b2201e6d11f45..046d489f7eb312c81c2b214a49b8714474f6210a 100644 (file)
@@ -562,6 +562,10 @@ Wformat-contains-nul
 C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
 Warn about format strings that contain NUL bytes.
 
+Wformat-diag
+C ObjC C++ ObjC++ Var(warn_format_diag) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
+Warn about GCC format strings with strings unsuitable for diagnostics..
+
 Wformat-extra-args
 C ObjC C++ ObjC++ Var(warn_format_extra_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 1, 0)
 Warn if passing too many arguments to a function for its format string.
index 863fabfffdd032ea06a526fd7db2bf659de71883..f558d28dc25911f03e568ef9a6b84529b80b7b79 100644 (file)
@@ -1,3 +1,17 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * c-decl.c (start_decl): Quote keywords, operators, and
+        types in diagnostics.
+        (finish_decl): Same.
+        * c-parser.c (c_parser_asm_statement): Same.
+        (c_parser_conditional_expression): Same.
+        (c_parser_transaction_cancel): Same.
+        * c-typeck.c (c_common_type): Same.
+        (build_conditional_expr): Same.
+        (digest_init): Same.
+        (process_init_element): Same.
+        (build_binary_op): Same.
+
 2019-05-17  Richard Biener  <rguenther@suse.de>
 
        * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
index c8e7cd01d9ec1abe5c6255ea2f41b282b474e0f0..181a8c2e9aa0c8f758a5fbb1cd603fa4eabe999d 100644 (file)
@@ -1780,15 +1780,16 @@ diagnose_arglist_conflict (tree newdecl, tree olddecl,
       if (TREE_CHAIN (t) == NULL_TREE
          && TYPE_MAIN_VARIANT (type) != void_type_node)
        {
-         inform (input_location, "a parameter list with an ellipsis can%'t match "
-                 "an empty parameter name list declaration");
+         inform (input_location, "a parameter list with an ellipsis "
+                 "cannot match an empty parameter name list declaration");
          break;
        }
 
       if (c_type_promotes_to (type) != type)
        {
-         inform (input_location, "an argument type that has a default promotion can%'t match "
-                 "an empty parameter name list declaration");
+         inform (input_location, "an argument type that has a default "
+                 "promotion cannot match an empty parameter name list "
+                 "declaration");
          break;
        }
     }
@@ -4887,7 +4888,7 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
     switch (TREE_CODE (decl))
       {
       case TYPE_DECL:
-       error ("typedef %qD is initialized (use __typeof__ instead)", decl);
+       error ("typedef %qD is initialized (use %<__typeof__%> instead)", decl);
        initialized = false;
        break;
 
@@ -5282,7 +5283,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
              && VAR_P (decl)
              && !C_DECL_REGISTER (decl)
              && !TREE_STATIC (decl))
-           warning (0, "ignoring asm-specifier for non-static local "
+           warning (0, "ignoring %<asm%> specifier for non-static local "
                     "variable %q+D", decl);
          else
            set_user_assembler_name (decl, asmspec);
@@ -5725,10 +5726,10 @@ warn_variable_length_array (tree name, tree size)
       if (name)
        pedwarn_c90 (input_location, OPT_Wvla,
                     "ISO C90 forbids array %qE whose size "
-                    "can%'t be evaluated", name);
+                    "cannot be evaluated", name);
       else
        pedwarn_c90 (input_location, OPT_Wvla, "ISO C90 forbids array "
-                    "whose size can%'t be evaluated");
+                    "whose size cannot be evaluated");
     }
   else
     {
index 3aa85125cf1a06a227a53032b09f779905bae38f..993cfe05ecb0c9b7a87b2ff6bf05bace5790a10f 100644 (file)
@@ -6401,7 +6401,7 @@ c_parser_asm_statement (c_parser *parser)
        case RID_VOLATILE:
          if (volatile_loc)
            {
-             error_at (loc, "duplicate asm qualifier %qE", token->value);
+             error_at (loc, "duplicate %<asm%> qualifier %qE", token->value);
              inform (volatile_loc, "first seen here");
            }
          else
@@ -6412,7 +6412,7 @@ c_parser_asm_statement (c_parser *parser)
        case RID_INLINE:
          if (inline_loc)
            {
-             error_at (loc, "duplicate asm qualifier %qE", token->value);
+             error_at (loc, "duplicate %<asm%> qualifier %qE", token->value);
              inform (inline_loc, "first seen here");
            }
          else
@@ -6423,7 +6423,7 @@ c_parser_asm_statement (c_parser *parser)
        case RID_GOTO:
          if (goto_loc)
            {
-             error_at (loc, "duplicate asm qualifier %qE", token->value);
+             error_at (loc, "duplicate %<asm%> qualifier %qE", token->value);
              inform (goto_loc, "first seen here");
            }
          else
@@ -6433,7 +6433,7 @@ c_parser_asm_statement (c_parser *parser)
 
        case RID_CONST:
        case RID_RESTRICT:
-         error_at (loc, "%qE is not an asm qualifier", token->value);
+         error_at (loc, "%qE is not a valid %<asm%> qualifier", token->value);
          c_parser_consume_token (parser);
          continue;
 
@@ -6791,7 +6791,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after,
 
       location_t middle_loc = c_parser_peek_token (parser)->location;
       pedwarn (middle_loc, OPT_Wpedantic,
-              "ISO C forbids omitting the middle term of a ?: expression");
+              "ISO C forbids omitting the middle term of a %<?:%> expression");
       if (TREE_CODE (cond.value) == EXCESS_PRECISION_EXPR)
        {
          eptype = TREE_TYPE (cond.value);
@@ -19825,8 +19825,8 @@ c_parser_transaction_cancel (c_parser *parser)
          && !is_tm_may_cancel_outer (current_function_decl))
        {
          error_at (loc, "outer %<__transaction_cancel%> not "
-                   "within outer %<__transaction_atomic%>");
-         error_at (loc, "  or a %<transaction_may_cancel_outer%> function");
+                   "within outer %<__transaction_atomic%> or "
+                   "a %<transaction_may_cancel_outer%> function");
          goto ret_error;
        }
     }
index 4e4437540028ee53110aeeb89c6f8c5812097687..5eff040e85dcd69960091f47186f7c8346ecb4c1 100644 (file)
@@ -743,17 +743,18 @@ c_common_type (tree t1, tree t2)
     {
       if (code1 == VECTOR_TYPE || code2 == VECTOR_TYPE)
        {
-         error ("can%'t mix operands of decimal float and vector types");
+         error ("cannot mix operands of decimal floating and vector types");
          return error_mark_node;
        }
       if (code1 == COMPLEX_TYPE || code2 == COMPLEX_TYPE)
        {
-         error ("can%'t mix operands of decimal float and complex types");
+         error ("cannot mix operands of decimal floating and complex types");
          return error_mark_node;
        }
       if (code1 == REAL_TYPE && code2 == REAL_TYPE)
        {
-         error ("can%'t mix operands of decimal float and other float types");
+         error ("cannot mix operands of decimal floating "
+                "and other floating types");
          return error_mark_node;
        }
     }
@@ -5253,13 +5254,13 @@ build_conditional_expr (location_t colon_loc, tree ifexp, bool ifexp_bcp,
                        /* OK */;
                      else if (unsigned_op2)
                        warning_at (op1_loc, OPT_Wsign_compare,
-                                   "operand of ?: changes signedness from "
+                                   "operand of %<?:%> changes signedness from "
                                    "%qT to %qT due to unsignedness of other "
                                    "operand", TREE_TYPE (orig_op1),
                                    TREE_TYPE (orig_op2));
                      else
                        warning_at (op2_loc, OPT_Wsign_compare,
-                                   "operand of ?: changes signedness from "
+                                   "operand of %<?:%> changes signedness from "
                                    "%qT to %qT due to unsignedness of other "
                                    "operand", TREE_TYPE (orig_op2),
                                    TREE_TYPE (orig_op1));
@@ -7764,13 +7765,13 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype,
                 that is counted in the length of the constant.  */
              if (compare_tree_int (TYPE_SIZE_UNIT (type), len - unit) < 0)
                pedwarn_init (init_loc, 0,
-                             ("initializer-string for array of chars "
-                              "is too long"));
+                             ("initializer-string for array of %qT "
+                              "is too long"), typ1);
              else if (warn_cxx_compat
                       && compare_tree_int (TYPE_SIZE_UNIT (type), len) < 0)
                warning_at (init_loc, OPT_Wc___compat,
-                           ("initializer-string for array chars "
-                            "is too long for C++"));
+                           ("initializer-string for array of %qT "
+                            "is too long for C++"), typ1);
              if (compare_tree_int (TYPE_SIZE_UNIT (type), len) < 0)
                {
                  unsigned HOST_WIDE_INT size
@@ -9888,7 +9889,7 @@ process_init_element (location_t loc, struct c_expr value, bool implicit,
       && integer_zerop (constructor_unfilled_index))
     {
       if (constructor_stack->replacement_value.value)
-       error_init (loc, "excess elements in char array initializer");
+       error_init (loc, "excess elements in %<char%> array initializer");
       constructor_stack->replacement_value = value;
       return;
     }
@@ -11937,7 +11938,7 @@ build_binary_op (location_t location, enum tree_code code,
       if (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1))
        warning_at (location,
                    OPT_Wfloat_equal,
-                   "comparing floating point with == or != is unsafe");
+                   "comparing floating point with %<==%> or %<!=%> is unsafe");
       /* Result of comparison is always int,
         but don't convert the args to int!  */
       build_type = integer_type_node;
index 3a4bd354bf97247c93af8963bc79b95ddcb50ffa..7722dcd4004e270551c8bcd4403e53a78ebfdff0 100644 (file)
@@ -1702,7 +1702,7 @@ expand_one_var (tree var, bool toplevel, bool really_expand)
         {
           if (lookup_attribute ("naked",
                                 DECL_ATTRIBUTES (current_function_decl)))
-            error ("cannot allocate stack for variable %q+D, naked function.",
+           error ("cannot allocate stack for variable %q+D, naked function",
                    var);
 
           expand_one_stack_var (origvar);
@@ -2840,7 +2840,8 @@ tree_conflicts_with_clobbers_p (tree t, HARD_REG_SET *clobbered_regs)
 
   if (overlap)
     {
-      error ("asm-specifier for variable %qE conflicts with asm clobber list",
+      error ("%<asm%> specifier for variable %qE conflicts with "
+            "%<asm%> clobber list",
             DECL_NAME (overlap));
 
       /* Reset registerness to stop multiple errors emitted for a single
@@ -3262,7 +3263,8 @@ expand_asm_stmt (gasm *stmt)
          if (allows_reg && TYPE_MODE (type) != BLKmode)
            op = force_reg (TYPE_MODE (type), op);
          else if (!allows_mem)
-           warning (0, "asm operand %d probably doesn%'t match constraints",
+           warning (0, "%<asm%> operand %d probably does not match "
+                    "constraints",
                     i + noutputs);
          else if (MEM_P (op))
            {
@@ -3445,11 +3447,13 @@ expand_asm_stmt (gasm *stmt)
                 tripping over the under-construction body.  */
              for (unsigned k = 0; k < noutputs; ++k)
                if (reg_overlap_mentioned_p (clobbered_reg, output_rvec[k]))
-                 internal_error ("asm clobber conflict with output operand");
+                 internal_error ("%<asm%> clobber conflict with "
+                                 "output operand");
 
              for (unsigned k = 0; k < ninputs - ninout; ++k)
                if (reg_overlap_mentioned_p (clobbered_reg, input_rvec[k]))
-                 internal_error ("asm clobber conflict with input operand");
+                 internal_error ("%<asm%> clobber conflict with "
+                                 "input operand");
            }
 
          XVECEXP (body, 0, i++) = gen_rtx_CLOBBER (VOIDmode, clobbered_reg);
index 325cefad836690a336c38180ad377eaed9b72308..f4d668819c622c1a1d705978e377297e0d459dd2 100644 (file)
@@ -796,8 +796,8 @@ process_function_and_variable_attributes (cgraph_node *first,
          /* redefining extern inline function makes it DECL_UNINLINABLE.  */
          && !DECL_UNINLINABLE (decl))
        warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wattributes,
-                   "always_inline function might not be inlinable");
-     
+                   "%<always_inline%> function might not be inlinable");
+
       process_common_attributes (node, decl);
     }
   for (vnode = symtab->first_variable (); vnode != first_var;
index 1b1b27c925152501e84988f0fcdc5f67cb9d0ad0..75645b9d533c9a93011a0ead495e68646214c608 100644 (file)
@@ -65,7 +65,7 @@ collect_wait (const char *prog, struct pex_obj *pex)
   int status;
 
   if (!pex_get_status (pex, 1, &status))
-    fatal_error (input_location, "can%'t get program status: %m");
+    fatal_error (input_location, "cannot get program status: %m");
   pex_free (pex);
 
   if (response_file && !save_temps)
@@ -180,7 +180,7 @@ collect_execute (const char *prog, char **argv, const char *outname,
 
   pex = pex_init (0, "collect2", NULL);
   if (pex == NULL)
-    fatal_error (input_location, "pex_init failed: %m");
+    fatal_error (input_location, "%<pex_init%> failed: %m");
 
   errmsg = pex_run (pex, flags, argv[0], argv, outname,
                    errname, &err);
index eb84f84639be7593ae4937764bec44930a6389ac..d6a7355e218aa8175d9d2073c17afde9a76f2d80 100644 (file)
@@ -701,7 +701,8 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst,
       size_t num_files;
 
       if (!lto_wrapper)
-       fatal_error (input_location, "COLLECT_LTO_WRAPPER must be set");
+       fatal_error (input_location, "environment variable "
+                    "%<COLLECT_LTO_WRAPPER%> must be set");
 
       num_lto_c_args++;
 
@@ -1396,7 +1397,7 @@ main (int argc, char **argv)
 
                  stream = fopen (list_filename, "r");
                  if (stream == NULL)
-                   fatal_error (input_location, "can%'t open %s: %m",
+                   fatal_error (input_location, "cannot open %s: %m",
                                 list_filename);
 
                  while (fgets (buf, sizeof buf, stream) != NULL)
@@ -2382,7 +2383,7 @@ is_lto_object_file (const char *prog_name)
     return true;
 
   if (errmsg)
-    fatal_error (0, "%s: %s\n", errmsg, xstrerror (err));
+    fatal_error (0, "%s: %s", errmsg, xstrerror (err));
   return false;
 }
 
@@ -2448,7 +2449,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
 
   pex = pex_init (PEX_USE_PIPES, "collect2", NULL);
   if (pex == NULL)
-    fatal_error (input_location, "pex_init failed: %m");
+    fatal_error (input_location, "%<pex_init%> failed: %m");
 
   errmsg = pex_run (pex, 0, nm_file_name, real_nm_argv, NULL, HOST_BIT_BUCKET,
                    &err);
@@ -2470,7 +2471,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
 
   inf = pex_read_output (pex, 0);
   if (inf == NULL)
-    fatal_error (input_location, "can%'t open nm output: %m");
+    fatal_error (input_location, "cannot open nm output: %m");
 
   if (debug)
     fprintf (stderr, "\nnm output with constructors/destructors.\n");
@@ -2639,7 +2640,7 @@ scan_libraries (const char *prog_name)
 
   inf = pex_read_output (pex, 0);
   if (inf == NULL)
-    fatal_error (input_location, "can%'t open ldd output: %m");
+    fatal_error (input_location, "cannot open ldd output: %m");
 
   if (debug)
     notice ("\nldd output with constructors/destructors.\n");
index 1f904671c6909573290fa97858b7c933b431d8f2..93dc99fc365f059ba4d6bbfbfc3e372a0a20dc65 100644 (file)
@@ -11828,9 +11828,9 @@ aarch64_validate_mbranch_protection (const char *const_str)
   enum aarch64_parse_opt_result res =
     aarch64_parse_branch_protection (const_str, &str);
   if (res == AARCH64_PARSE_INVALID_ARG)
-    error ("invalid arg %<%s%> for %<-mbranch-protection=%>", str);
+    error ("invalid argument %<%s%> for %<-mbranch-protection=%>", str);
   else if (res == AARCH64_PARSE_MISSING_ARG)
-    error ("missing arg for %<-mbranch-protection=%>");
+    error ("missing argument for %<-mbranch-protection=%>");
   free (str);
   return res == AARCH64_PARSE_OK;
 }
index f2a82a01899643afbfd699f407bb16df8656b661..87e0973e1cae3f8f1d57d56dcb37e6b776f1c9ab 100644 (file)
@@ -7969,7 +7969,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
       if (fndecl
          && (lookup_attribute ("interrupt",
                                TYPE_ATTRIBUTES (TREE_TYPE (fndecl)))))
-       error ("interrupt service routine can%'t be called directly");
+       error ("interrupt service routine cannot be called directly");
     }
   else
     fndecl = NULL_TREE;
@@ -10761,7 +10761,8 @@ get_element_number (tree vec_type, tree arg)
   if (!tree_fits_uhwi_p (arg)
       || (elt = tree_to_uhwi (arg), elt > max))
     {
-      error ("selector must be an integer constant in the range 0..%wi", max);
+      error ("selector must be an integer constant in the range "
+            "[0, %wi]", max);
       return 0;
     }
 
index 67f45d66c48a033620d2b76fd39df6ebf2c31dbd..60a120f4df7bc384edf9dd6cf9f54bfe392180c6 100644 (file)
@@ -2447,7 +2447,7 @@ ix86_mangle_function_version_assembler_name (tree decl, tree id)
       && lookup_attribute ("gnu_inline",
                           DECL_ATTRIBUTES (decl)))
     error_at (DECL_SOURCE_LOCATION (decl),
-             "function versions cannot be marked as gnu_inline,"
+             "function versions cannot be marked as %<gnu_inline%>,"
              " bodies have to be generated");
 
   if (DECL_VIRTUAL_P (decl)
index dec8352143cefe3439ab2faaf2666c2bee8c5ef9..bde104879cb83d4d0e4f066fc1a9136a3eea2b34 100644 (file)
@@ -3462,7 +3462,8 @@ ix86_handle_abi_attribute (tree *node, tree name, tree, int,
     {
       if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (*node)))
         {
-         error ("ms_abi and sysv_abi attributes are not compatible");
+         error ("%qs and %qs attributes are not compatible",
+                "ms_abi", "sysv_abi");
        }
 
       return NULL_TREE;
@@ -3471,7 +3472,8 @@ ix86_handle_abi_attribute (tree *node, tree name, tree, int,
     {
       if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (*node)))
         {
-         error ("ms_abi and sysv_abi attributes are not compatible");
+         error ("%qs and %qs attributes are not compatible",
+                "ms_abi", "sysv_abi");
        }
 
       return NULL_TREE;
@@ -3582,7 +3584,7 @@ ix86_handle_interrupt_attribute (tree *node, tree, tree, int, bool *)
     error ("interrupt service routine can only have a pointer argument "
           "and an optional integer argument");
   if (! VOID_TYPE_P (return_type))
-    error ("interrupt service routine can%'t have non-void return value");
+    error ("interrupt service routine must return %<void%>");
 
   return NULL_TREE;
 }
index 7e24dd39cf18cd13492847cabc8308d68a9299a8..d3eb7c8cb06f2fad85845ff1bba78491cdd25011 100644 (file)
@@ -1525,7 +1525,7 @@ ix86_function_type_abi (const_tree fntype)
       static int warned;
       if (TARGET_X32 && !warned)
        {
-         error ("X32 does not support ms_abi attribute");
+         error ("X32 does not support %<ms_abi%> attribute");
          warned = 1;
        }
 
@@ -1559,7 +1559,8 @@ ix86_function_ms_hook_prologue (const_tree fn)
     {
       if (decl_function_context (fn) != NULL_TREE)
        error_at (DECL_SOURCE_LOCATION (fn),
-                 "ms_hook_prologue is not compatible with nested function");
+                 "%<ms_hook_prologue%> attribute is not compatible "
+                 "with nested function");
       else
         return true;
     }
@@ -2266,7 +2267,7 @@ classify_argument (machine_mode mode, const_tree type,
                {
                  warned = true;
                  inform (input_location,
-                         "the ABI of passing union with long double"
+                         "the ABI of passing union with %<long double%>"
                          " has changed in GCC 4.4");
                }
              return 0;
@@ -2384,7 +2385,7 @@ classify_argument (machine_mode mode, const_tree type,
            {
              warned = true;
              inform (input_location,
-                     "the ABI of passing structure with complex float"
+                     "the ABI of passing structure with %<complex float%>"
                      " member has changed in GCC 4.4");
            }
          classes[1] = X86_64_SSESF_CLASS;
@@ -7787,7 +7788,7 @@ ix86_expand_prologue (void)
       /* Check if profiling is active and we shall use profiling before
          prologue variant. If so sorry.  */
       if (crtl->profile && flag_fentry != 0)
-        sorry ("ms_hook_prologue attribute isn%'t compatible "
+       sorry ("%<ms_hook_prologue%> attribute is not compatible "
               "with %<-mfentry%> for 32-bit");
 
       /* In ix86_asm_output_function_label we emitted:
@@ -20655,7 +20656,7 @@ ix86_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &/*inputs*/,
       con += 4;
       if (strchr (con, ',') != NULL)
        {
-         error ("alternatives not allowed in asm flag output");
+         error ("alternatives not allowed in %<asm%> flag output");
          continue;
        }
 
@@ -20719,7 +20720,7 @@ ix86_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &/*inputs*/,
        }
       if (code == UNKNOWN)
        {
-         error ("unknown asm flag output %qs", constraints[i]);
+         error ("unknown %<asm%> flag output %qs", constraints[i]);
          continue;
        }
       if (invert)
@@ -20748,7 +20749,7 @@ ix86_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &/*inputs*/,
       machine_mode dest_mode = GET_MODE (dest);
       if (!SCALAR_INT_MODE_P (dest_mode))
        {
-         error ("invalid type for asm flag output");
+         error ("invalid type for %<asm%> flag output");
          continue;
        }
 
@@ -21682,13 +21683,15 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val)
   if (val & IX86_HLE_ACQUIRE && !(is_mm_acquire (model) || strong))
     {
       warning (OPT_Winvalid_memory_model,
-              "HLE_ACQUIRE not used with ACQUIRE or stronger memory model");
+             "%<HLE_ACQUIRE%> not used with %<ACQUIRE%> or stronger "
+              "memory model");
       return MEMMODEL_SEQ_CST | IX86_HLE_ACQUIRE;
     }
   if (val & IX86_HLE_RELEASE && !(is_mm_release (model) || strong))
     {
       warning (OPT_Winvalid_memory_model,
-              "HLE_RELEASE not used with RELEASE or stronger memory model");
+             "%<HLE_RELEASE%> not used with %<RELEASE%> or stronger "
+              "memory model");
       return MEMMODEL_SEQ_CST | IX86_HLE_RELEASE;
     }
   return val;
index 32d475524d793ca66d3bab51db4a46e6878694b9..d5aa07b510e0e7831e8d121b383e42e5c6e89321 100644 (file)
@@ -415,11 +415,11 @@ convert_to_real_1 (tree type, tree expr, bool fold_p)
 
     case POINTER_TYPE:
     case REFERENCE_TYPE:
-      error ("pointer value used where a floating point value was expected");
+      error ("pointer value used where a floating point was expected");
       return convert_to_real_1 (type, integer_zero_node, fold_p);
 
     default:
-      error ("aggregate value used where a float was expected");
+      error ("aggregate value used where a floating point was expected");
       return convert_to_real_1 (type, integer_zero_node, fold_p);
     }
 }
@@ -1029,7 +1029,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
     case VECTOR_TYPE:
       if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr))))
        {
-         error ("can%'t convert a vector of type %qT"
+         error ("cannot convert a vector of type %qT"
                 " to type %qT which has different size",
                 TREE_TYPE (expr), type);
          return error_mark_node;
@@ -1166,7 +1166,7 @@ convert_to_vector (tree type, tree expr)
     case VECTOR_TYPE:
       if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr))))
        {
-         error ("can%'t convert a value of type %qT"
+         error ("cannot convert a value of type %qT"
                 " to vector type %qT which has different size",
                 TREE_TYPE (expr), type);
          return error_mark_node;
@@ -1174,7 +1174,7 @@ convert_to_vector (tree type, tree expr)
       return build1 (VIEW_CONVERT_EXPR, type, expr);
 
     default:
-      error ("can%'t convert value to a vector");
+      error ("cannot convert value to a vector");
       return error_mark_node;
     }
 }
index 058773f299902fdb9e405be3295ffadffb28eaee..08b7d5337071139a4f6df3da7d66fd4f5f9489b7 100644 (file)
@@ -1,3 +1,92 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * call.c (print_z_candidate): Wrap diagnostic text in a gettext
+        macro.  Adjust.
+        (print_z_candidates): Same.
+        (build_conditional_expr_1): Quote keywords, operators, and types
+        in diagnostics.
+        (build_op_delete_call): Same.
+        (maybe_print_user_conv_context): Wrap diagnostic text in a gettext
+        macro.
+        (convert_like_real): Same.
+        (convert_arg_to_ellipsis): Quote keywords, operators, and types
+        in diagnostics.
+        (build_over_call): Same.
+        (joust): Break up an overlong line.  Wrap diagnostic text in a gettext
+        macro.
+        * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English.
+        (cxx_eval_constant_expression): Quote keywords, operators, and types
+        in diagnostics.
+        (potential_constant_expression_1): Same.
+        * cp-gimplify.c (cp_genericize_r): Same.
+        * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types
+        in diagnostics.
+        (type_promotes_to): Same.
+        * decl.c (check_previous_goto_1): Same.
+        (check_goto): Same.
+        (start_decl): Same.
+        (cp_finish_decl): Avoid parenthesizing a sentence for consistency.
+        (grok_op_properties): Quote keywords, operators, and types
+        in diagnostics.
+        * decl2.c (grokfield): Same.
+        (coerce_delete_type): Same.
+        * except.c (is_admissible_throw_operand_or_catch_parameter): Same.
+        * friend.c (do_friend): Quote C++ tokens.
+        * init.c (build_new_1): Quote keywords, operators, and types
+        in diagnostics.
+        (build_vec_delete_1): Same.
+        (build_delete): Same.
+        * lex.c (parse_strconst_pragma): Same.
+        (handle_pragma_implementation): Same.
+        (unqualified_fn_lookup_error): Same.
+        * mangle.c (write_type): Same.
+        * method.c (defaulted_late_check): Avoid two consecutive punctuators.
+        * name-lookup.c (cp_binding_level_debug): Remove a trailing newline.
+        (pop_everything): Same.
+        * parser.c (cp_lexer_start_debugging): Quote a macro name.
+        in a diagnostic
+        (cp_lexer_stop_debugging): Same.
+        (cp_parser_userdef_numeric_literal): Quote a C++ header name
+        in a diagnostic.
+        (cp_parser_nested_name_specifier_opt): Quote keywords, operators,
+        and types in diagnostics.
+        (cp_parser_question_colon_clause): Same.
+        (cp_parser_asm_definition): Same.
+        (cp_parser_init_declarator): Same.
+        (cp_parser_template_declaration_after_parameters): Avoid capitalizing
+        a sentence in a diagnostic.
+        (cp_parser_omp_declare_reduction): Quote keywords, operators, and types
+        in diagnostics.
+        (cp_parser_transaction): Same.
+        * pt.c (maybe_process_partial_specialization): Replace second call
+        to permerror with inform for consistency with other uses.
+        (expand_integer_pack): Quote keywords, operators, and types
+        in diagnostics.
+        * rtti.c (get_typeid): Quote keywords, operators, and types
+        in diagnostics.
+        (build_dynamic_cast_1): Same.
+        * semantics.c (finish_asm_stmt): Same.
+        (finish_label_decl): Same.
+        (finish_bases): Same.
+        (finish_offsetof): Same.
+        (cp_check_omp_declare_reduction): Same.
+        (finish_decltype_type): Same.
+        * tree.c (handle_init_priority_attribute): Same.  Add detail
+        to diagnostics.
+        (maybe_warn_zero_as_null_pointer_constant): Same.
+        * typeck.c (cp_build_binary_op): Quote keywords, operators, and types
+        in diagnostics.
+        (cp_build_unary_op): Same.
+        (check_for_casting_away_constness): Same.
+        (build_static_cast): Same.
+        (build_const_cast_1): Same.
+        (maybe_warn_about_returning_address_of_local): Same.
+        (check_return_expr): Same.
+        * typeck2.c (abstract_virtuals_error_sfinae): Same.
+        (digest_init_r): Replace a tab with spaces in a diagnostic.
+        (build_functional_cast): Quote keywords, operators, and types
+        in diagnostics.
+
 2019-05-15  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/90197
index 0a5147a1a2f4eef574fc90e98d34c4f9ede32cc7..e160dd160eabfc99b258322c21c53800477541a8 100644 (file)
@@ -3603,7 +3603,7 @@ print_z_candidate (location_t loc, const char *msgstr,
 {
   const char *msg = (msgstr == NULL
                     ? ""
-                    : ACONCAT ((msgstr, " ", NULL)));
+                    : ACONCAT ((_(msgstr), " ", NULL)));
   tree fn = candidate->fn;
   if (flag_new_inheriting_ctors)
     fn = strip_inheriting_ctors (fn);
@@ -3613,24 +3613,24 @@ print_z_candidate (location_t loc, const char *msgstr,
     {
       cloc = loc;
       if (candidate->num_convs == 3)
-       inform (cloc, "%s%<%D(%T, %T, %T)%> <built-in>", msg, fn,
+       inform (cloc, "%s%<%D(%T, %T, %T)%> (built-in)", msg, fn,
                candidate->convs[0]->type,
                candidate->convs[1]->type,
                candidate->convs[2]->type);
       else if (candidate->num_convs == 2)
-       inform (cloc, "%s%<%D(%T, %T)%> <built-in>", msg, fn,
+       inform (cloc, "%s%<%D(%T, %T)%> (built-in)", msg, fn,
                candidate->convs[0]->type,
                candidate->convs[1]->type);
       else
-       inform (cloc, "%s%<%D(%T)%> <built-in>", msg, fn,
+       inform (cloc, "%s%<%D(%T)%> (built-in)", msg, fn,
                candidate->convs[0]->type);
     }
   else if (TYPE_P (fn))
-    inform (cloc, "%s%qT <conversion>", msg, fn);
+    inform (cloc, "%s%qT (conversion)", msg, fn);
   else if (candidate->viable == -1)
-    inform (cloc, "%s%#qD <near match>", msg, fn);
+    inform (cloc, "%s%#qD (near match)", msg, fn);
   else if (DECL_DELETED_FN (fn))
-    inform (cloc, "%s%#qD <deleted>", msg, fn);
+    inform (cloc, "%s%#qD (deleted)", msg, fn);
   else
     inform (cloc, "%s%#qD", msg, fn);
   if (fn != candidate->fn)
@@ -3763,7 +3763,7 @@ print_z_candidates (location_t loc, struct z_candidate *candidates)
     }
 
   for (; candidates; candidates = candidates->next)
-    print_z_candidate (loc, "candidate:", candidates);
+    print_z_candidate (loc, N_("candidate:"), candidates);
 }
 
 /* USER_SEQ is a user-defined conversion sequence, beginning with a
@@ -5003,7 +5003,8 @@ build_conditional_expr_1 (const op_location_t &loc,
     {
       if (complain & tf_error)
        pedwarn (loc, OPT_Wpedantic,
-                "ISO C++ forbids omitting the middle term of a ?: expression");
+                "ISO C++ forbids omitting the middle term of "
+                "a %<?:%> expression");
 
       if ((complain & tf_warning) && !truth_value_p (TREE_CODE (arg1)))
        warn_for_omitted_condop (loc, arg1);
@@ -5276,7 +5277,8 @@ build_conditional_expr_1 (const op_location_t &loc,
        {
          if (complain & tf_error)
            {
-             error_at (loc, "operands to ?: have different types %qT and %qT",
+             error_at (loc, "operands to %<?:%> have different types "
+                       "%qT and %qT",
                        arg2_type, arg3_type);
              if (conv2 && !conv2->bad_p && conv3 && !conv3->bad_p)
                inform (loc, "  and each type can be converted to the other");
@@ -5392,7 +5394,7 @@ build_conditional_expr_1 (const op_location_t &loc,
       if (!any_viable_p)
        {
           if (complain & tf_error)
-           error_at (loc, "operands to ?: have different types %qT and %qT",
+           error_at (loc, "operands to %<?:%> have different types %qT and %qT",
                      arg2_type, arg3_type);
          return error_mark_node;
        }
@@ -5539,7 +5541,7 @@ build_conditional_expr_1 (const op_location_t &loc,
   if (!result_type)
     {
       if (complain & tf_error)
-        error_at (loc, "operands to ?: have different types %qT and %qT",
+       error_at (loc, "operands to %<?:%> have different types %qT and %qT",
                  arg2_type, arg3_type);
       return error_mark_node;
     }
@@ -6489,10 +6491,10 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
        {
          const char *const msg1
            = G_("exception cleanup for this placement new selects "
-                "non-placement operator delete");
+                "non-placement %<operator delete%>");
          const char *const msg2
            = G_("%qD is a usual (non-placement) deallocation "
-                "function in C++14 (or with -fsized-deallocation)");
+                "function in C++14 (or with %<-fsized-deallocation%>)");
 
          /* But if the class has an operator delete (void *), then that is
             the usual deallocation function, so we shouldn't complain
@@ -6889,7 +6891,7 @@ maybe_print_user_conv_context (conversion *convs)
     for (conversion *t = convs; t; t = next_conversion (t))
       if (t->kind == ck_user)
        {
-         print_z_candidate (0, "  after user-defined conversion:",
+         print_z_candidate (0, N_("  after user-defined conversion:"),
                             t->cand);
          break;
        }
@@ -7002,7 +7004,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
                                      "from %qH to %qI", TREE_TYPE (expr),
                                      totype);
              if (complained)
-               print_z_candidate (loc, "candidate is:", t->cand);
+               print_z_candidate (loc, N_("candidate is:"), t->cand);
              expr = convert_like_real (t, expr, fn, argnum,
                                        /*issue_conversion_warnings=*/false,
                                        /*c_cast_p=*/false,
@@ -7514,8 +7516,9 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain)
          if (abi_version_crosses (6)
              && 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,
+           warning_at (loc, OPT_Wabi, "scoped enum %qT passed through %<...%>"
+                       "as %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;
@@ -8593,8 +8596,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
          if (is_std_init_list (type)
              && conv_binds_ref_to_prvalue (convs[1]))
            warning_at (loc, OPT_Winit_list_lifetime,
-                       "assignment from temporary initializer_list does not "
-                       "extend the lifetime of the underlying array");
+                       "assignment from temporary %<initializer_list%> does "
+                       "not extend the lifetime of the underlying array");
          arg = cp_build_fold_indirect_ref (arg);
          val = build2 (MODIFY_EXPR, TREE_TYPE (to), to, arg);
        }
@@ -10740,7 +10743,8 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
              && warning (OPT_Wconversion, "  for conversion from %qH to %qI",
                          source, w->second_conv->type)) 
            {
-             inform (input_location, "  because conversion sequence for the argument is better");
+             inform (input_location, "  because conversion sequence "
+                     "for the argument is better");
            }
        }
       else
@@ -11026,8 +11030,8 @@ tweak:
                           "though the worst conversion for the first is "
                           "better than the worst conversion for the second:"))
                {
-                 print_z_candidate (input_location, _("candidate 1:"), w);
-                 print_z_candidate (input_location, _("candidate 2:"), l);
+                 print_z_candidate (input_location, N_("candidate 1:"), w);
+                 print_z_candidate (input_location, N_("candidate 2:"), l);
                }
            }
          else
index 8ae0fd5715f99e6cbe15254938dbc210151e7d9b..67a8f04310cbb381a1e6a62d4a9f6a09d00a590d 100644 (file)
@@ -2020,9 +2020,9 @@ cxx_eval_check_shift_p (location_t loc, const constexpr_ctx *ctx,
   if (compare_tree_int (rhs, uprec) >= 0)
     {
       if (!ctx->quiet)
-       permerror (loc, "right operand of shift expression %q+E is >= than "
-                  "the precision of the left operand",
-                  build2_loc (loc, code, type, lhs, rhs));
+       permerror (loc, "right operand of shift expression %q+E is greater "
+                  "than or equal to the precision %wu of the left operand",
+                  build2_loc (loc, code, type, lhs, rhs), uprec);
       return (!flag_permissive || ctx->quiet);
     }
 
@@ -4420,7 +4420,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
       if (!ctx->quiet)
        error_at (cp_expr_loc_or_loc (t, input_location),
                  "%<constexpr%> evaluation operation count exceeds limit of "
-                 "%wd (use -fconstexpr-ops-limit= to increase the limit)",
+                 "%wd (use %<-fconstexpr-ops-limit=%> to increase the limit)",
                  constexpr_ops_limit);
       *ctx->constexpr_ops_count = INTTYPE_MINIMUM (HOST_WIDE_INT);
       *non_constant_p = true;
@@ -4957,7 +4957,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
        {
          if (!ctx->quiet)
            error_at (cp_expr_loc_or_loc (t, input_location),
-                     "a reinterpret_cast is not a constant expression");
+                     "%<reinterpret_cast%> is not a constant expression");
          *non_constant_p = true;
          return t;
        }
@@ -6116,7 +6116,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
       if (REINTERPRET_CAST_P (t))
        {
          if (flags & tf_error)
-           error_at (loc, "a reinterpret_cast is not a constant expression");
+           error_at (loc, "%<reinterpret_cast%> is not a constant expression");
          return false;
        }
       /* FALLTHRU */
@@ -6135,7 +6135,8 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
                && !integer_zerop (from))
              {
                if (flags & tf_error)
-                 error_at (loc, "reinterpret_cast from integer to pointer");
+                 error_at (loc,
+                           "%<reinterpret_cast%> from integer to pointer");
                return false;
              }
          }
@@ -6389,7 +6390,8 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
        /* In C++2a virtual calls can be constexpr, don't give up yet.  */
        return true;
       else if (flags & tf_error)
-       error_at (loc, "virtual functions cannot be constexpr before C++2a");
+       error_at (loc,
+                 "virtual functions cannot be %<constexpr%> before C++2a");
       return false;
 
     case TYPEID_EXPR:
@@ -6401,7 +6403,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
            && TYPE_POLYMORPHIC_P (TREE_TYPE (e)))
           {
             if (flags & tf_error)
-              error_at (loc, "typeid-expression is not a constant expression "
+             error_at (loc, "%<typeid%> is not a constant expression "
                        "because %qE is of polymorphic type", e);
             return false;
           }
index 72d8581ffe51eecc6ee8335044bc755d67c6bd79..e8c22c071c22c8a93b8100a5bf35afb1faebebfc 100644 (file)
@@ -1489,10 +1489,10 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
              {
                auto_diagnostic_group d;
                if (warning_at (loc, OPT_Wterminate,
-                               "throw will always call terminate()")
+                               "%<throw%> will always call %<terminate%>")
                    && cxx_dialect >= cxx11
                    && DECL_DESTRUCTOR_P (current_function_decl))
-                 inform (loc, "in C++11 destructors default to noexcept");
+                 inform (loc, "in C++11 destructors default to %<noexcept%>");
              }
          }
        else
@@ -1504,8 +1504,8 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
                && (get_defaulted_eh_spec (current_function_decl)
                    == empty_except_spec))
              warning_at (loc, OPT_Wc__11_compat,
-                         "in C++11 this throw will terminate because "
-                         "destructors default to noexcept");
+                         "in C++11 this %<throw%> will call %<terminate%> "
+                         "because destructors default to %<noexcept%>");
          }
       }
       break;
index 3d409279f2272dbde2c75e4500849684fb1d1e98..7ebbf3c80c49906cb6d0fef0363b0382329feb3a 100644 (file)
@@ -88,7 +88,7 @@ cp_convert_to_pointer (tree type, tree expr, bool dofold,
       if (!COMPLETE_TYPE_P (intype))
        {
          if (complain & tf_error)
-           error_at (loc, "can%'t convert from incomplete type %qH to %qI",
+           error_at (loc, "cannot convert from incomplete type %qH to %qI",
                      intype, type);
          return error_mark_node;
        }
@@ -1060,14 +1060,14 @@ maybe_warn_nodiscard (tree expr, impl_conv_void implicit)
          auto_diagnostic_group d;
          if (warning_at (loc, OPT_Wunused_result,
                          "ignoring return value of %qD, "
-                         "declared with attribute warn_unused_result",
+                         "declared with attribute %<warn_unused_result%>",
                          fn))
            inform (DECL_SOURCE_LOCATION (fn), "declared here");
        }
       else
        warning_at (loc, OPT_Wunused_result,
                    "ignoring return value of function "
-                   "declared with attribute warn_unused_result");
+                   "declared with attribute %<warn_unused_result%>");
     }
 }
 
@@ -1820,7 +1820,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
          if (TREE_CODE (cand) == TEMPLATE_DECL)
            {
              if (complain)
-               error ("default type conversion can%'t deduce template"
+               error ("default type conversion cannot deduce template"
                       " argument for %qD", cand);
              return error_mark_node;
            }
@@ -1920,7 +1920,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 "
+           warning (OPT_Wabi, "scoped enum %qT passed through %<...%> as "
                     "%qT before %<-fabi-version=6%>, %qT after",
                     type, prom, ENUM_UNDERLYING_TYPE (type));
          if (!abi_version_at_least (6))
index 6918c3bb79deeebd2142dee0a987d331e6bc04b3..19d14a6a5e9f0ffa89a25749360208a90ad3f455 100644 (file)
@@ -3228,32 +3228,32 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
        {
        case sk_try:
          if (!saw_eh)
-           inf = N_("enters try block");
+           inf = G_("  enters %<try%> block");
          saw_eh = true;
          break;
 
        case sk_catch:
          if (!saw_eh)
-           inf = N_("enters catch block");
+           inf = G_("  enters %<catch%> block");
          saw_eh = true;
          break;
 
        case sk_omp:
          if (!saw_omp)
-           inf = N_("enters OpenMP structured block");
+           inf = G_("  enters OpenMP structured block");
          saw_omp = true;
          break;
 
        case sk_transaction:
          if (!saw_tm)
-           inf = N_("enters synchronized or atomic statement");
+           inf = G_("  enters synchronized or atomic statement");
          saw_tm = true;
          break;
 
        case sk_block:
          if (!saw_cxif && level_for_constexpr_if (b->level_chain))
            {
-             inf = N_("enters constexpr if statement");
+             inf = G_("  enters %<constexpr if%> statement");
              loc = EXPR_LOCATION (b->level_chain->this_entity);
              saw_cxif = true;
            }
@@ -3269,7 +3269,7 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
            complained = identify_goto (decl, input_location, locus, DK_ERROR);
          identified = 2;
          if (complained)
-           inform (loc, "  %s", inf);
+           inform (loc, inf);
        }
     }
 
@@ -3364,7 +3364,7 @@ check_goto (tree decl)
              identified = 2;
            }
          if (complained)
-           inform (DECL_SOURCE_LOCATION (bad), "  enters catch block");
+           inform (DECL_SOURCE_LOCATION (bad), "  enters %<catch%> block");
          saw_catch = true;
        }
       else if (complained)
@@ -3382,13 +3382,13 @@ check_goto (tree decl)
   if (complained)
     {
       if (ent->in_try_scope)
-       inform (input_location, "  enters try block");
+       inform (input_location, "  enters %<try%> block");
       else if (ent->in_catch_scope && !saw_catch)
-       inform (input_location, "  enters catch block");
+       inform (input_location, "  enters %<catch%> block");
       else if (ent->in_transaction_scope)
        inform (input_location, "  enters synchronized or atomic statement");
       else if (ent->in_constexpr_if)
-       inform (input_location, "  enters %<constexpr%> if statement");
+       inform (input_location, "  enters %<constexpr if%> statement");
     }
 
   if (ent->in_omp_scope)
@@ -5078,7 +5078,8 @@ start_decl (const cp_declarator *declarator,
       && TREE_CODE (decl) == TYPE_DECL)
     {
       error_at (DECL_SOURCE_LOCATION (decl),
-               "typedef %qD is initialized (use decltype instead)", decl);
+               "typedef %qD is initialized (use %qs instead)",
+               decl, "decltype");
       return error_mark_node;
     }
 
@@ -7020,8 +7021,8 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
        return;
       if (TREE_CODE (type) == FUNCTION_TYPE)
        {
-         error ("initializer for %<decltype(auto) %D%> has function type "
-                "(did you forget the %<()%> ?)", decl);
+         error ("initializer for %<decltype(auto) %D%> has function type; "
+                "did you forget the %<()%>?", decl);
          TREE_TYPE (decl) = error_mark_node;
          return;
        }
@@ -11569,7 +11570,7 @@ grokdeclarator (const cp_declarator *declarator,
                  error ("friend declaration not in class definition");
                if (current_function_decl && funcdef_flag)
                  {
-                   error ("can%'t define friend function %qs in a local "
+                   error ("cannot define friend function %qs in a local "
                           "class definition", name);
                    friendp = 0;
                  }
@@ -13612,7 +13613,7 @@ grok_op_properties (tree decl, bool complain)
   if (operator_code == COND_EXPR)
     {
       /* 13.4.0.3 */
-      error_at (loc, "ISO C++ prohibits overloading operator ?:");
+      error_at (loc, "ISO C++ prohibits overloading %<operator ?:%>");
       return false;
     }
 
index fb3b911fdd5fd03109220c05aa76302a5232bb10..bd022ca7ae37b431e47adb1722db3adee7e98323 100644 (file)
@@ -830,7 +830,8 @@ grokfield (const cp_declarator *declarator,
   if (TREE_CODE (value) == TYPE_DECL && init)
     {
       error_at (cp_expr_loc_or_loc (init, DECL_SOURCE_LOCATION (value)),
-               "typedef %qD is initialized (use decltype instead)", value);
+               "typedef %qD is initialized (use %qs instead)",
+               value, "decltype");
       init = NULL_TREE;
     }
 
@@ -1772,12 +1773,13 @@ coerce_delete_type (tree decl, location_t loc)
       else
        /* A destroying operator delete shall be a class member function named
           operator delete.  */
-       error_at (loc, "destroying operator delete must be a member function");
+       error_at (loc,
+                 "destroying %<operator delete%> must be a member function");
       const ovl_op_info_t *op = IDENTIFIER_OVL_OP_INFO (DECL_NAME (decl));
       if (op->flags & OVL_OP_FLAG_VEC)
-       error_at (loc, "operator delete[] cannot be a destroying delete");
+       error_at (loc, "%<operator delete[]%> cannot be a destroying delete");
       if (!usual_deallocation_fn_p (decl))
-       error_at (loc, "destroying operator delete must be a usual "
+       error_at (loc, "destroying %<operator delete%> must be a usual "
                  "deallocation function");
     }
 
index 3b792cbc62bfa606c052de2385ac4974a8b42a15..892d5201da983901d8faa138cfad257107962ef7 100644 (file)
@@ -936,7 +936,7 @@ is_admissible_throw_operand_or_catch_parameter (tree t, bool is_throw)
           && TYPE_REF_P (type)
           && TYPE_REF_IS_RVALUE (type))
     {
-      error ("cannot declare catch parameter to be of rvalue "
+      error ("cannot declare %<catch%> parameter to be of rvalue "
             "reference type %qT", type);
       return false;
     }
index 2429cd4c4973c3935452eaa2fe321437aa83f4f4..4ea4bbc54a5e0416ee9a703caace62a962af5acc 100644 (file)
@@ -638,9 +638,10 @@ do_friend (tree ctype, tree declarator, tree decl,
                                "%q#D declares a non-template function", decl);
              if (! explained && warned)
                {
-                 inform (input_location, "(if this is not what you intended, make sure "
-                         "the function template has already been declared "
-                         "and add <> after the function name here) ");
+                 inform (input_location, "(if this is not what you intended, "
+                         "make sure the function template has already been "
+                         "declared and add %<<>%> after the function name "
+                         "here)");
                  explained = 1;
                }
            }
index 68d04ad7417d0baeb7f7050461be7f4ed77cb40e..4ffd96eef9d705c1566d6a7765466deb4c73e02f 100644 (file)
@@ -3005,7 +3005,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
          pedwarn (cp_expr_loc_or_loc (outer_nelts, input_location), OPT_Wvla,
                   typedef_variant_p (orig_type)
                   ? G_("non-constant array new length must be specified "
-                       "directly, not by typedef")
+                       "directly, not by %<typedef%>")
                   : G_("non-constant array new length must be specified "
                        "without parentheses around the type-id"));
        }
@@ -3016,13 +3016,13 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
   if (VOID_TYPE_P (elt_type))
     {
       if (complain & tf_error)
-        error ("invalid type %<void%> for new");
+       error ("invalid type %<void%> for %<new%>");
       return error_mark_node;
     }
 
   if (is_std_init_list (elt_type))
     warning (OPT_Winit_list_lifetime,
-            "%<new%> of initializer_list does not "
+            "%<new%> of %<initializer_list%> does not "
             "extend the lifetime of the underlying array");
 
   if (abstract_virtuals_error_sfinae (ACU_NEW, elt_type, complain))
@@ -3867,11 +3867,11 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
          auto_diagnostic_group d;
          if (warning (OPT_Wdelete_incomplete,
                         "possible problem detected in invocation of "
-                        "delete [] operator:"))
+                        "operator %<delete []%>"))
            {
              cxx_incomplete_type_diagnostic (base, type, DK_WARNING);
              inform (input_location, "neither the destructor nor the "
-                       "class-specific operator delete [] will be called, "
+                       "class-specific operator %<delete []%> will be called, "
                        "even if they are declared when the class is defined");
            }
        }
@@ -4753,14 +4753,14 @@ build_delete (tree otype, tree addr, special_function_kind auto_delete,
                {
                  auto_diagnostic_group d;
                  if (warning (OPT_Wdelete_incomplete,
-                                "possible problem detected in invocation of "
-                                "delete operator:"))
+                              "possible problem detected in invocation of "
+                              "%<operator delete%>"))
                    {
                      cxx_incomplete_type_diagnostic (addr, type, DK_WARNING);
                      inform (input_location,
-                               "neither the destructor nor the class-specific "
-                               "operator delete will be called, even if they "
-                               "are declared when the class is defined");
+                             "neither the destructor nor the class-specific "
+                             "%<operator delete%> will be called, even if "
+                             "they are declared when the class is defined");
                    }
                }
            }
index 369ecc05df2b2fe69877f9f3accdbaa05f9f89f3..20965e49fe471db47791311169b18e784b8868ec 100644 (file)
@@ -385,14 +385,14 @@ parse_strconst_pragma (const char* name, int opt)
   if (t == CPP_STRING)
     {
       if (pragma_lex (&x) != CPP_EOF)
-       warning (0, "junk at end of #pragma %s", name);
+       warning (0, "junk at end of %<#pragma %s%>", name);
       return result;
     }
 
   if (t == CPP_EOF && opt)
     return NULL_TREE;
 
-  error ("invalid #pragma %s", name);
+  error ("invalid %<#pragma %s%>", name);
   return error_mark_node;
 }
 
@@ -400,7 +400,7 @@ static void
 handle_pragma_vtable (cpp_reader* /*dfile*/)
 {
   parse_strconst_pragma ("vtable", 0);
-  sorry ("#pragma vtable no longer supported");
+  sorry ("%<#pragma vtable%> no longer supported");
 }
 
 static void
@@ -472,7 +472,7 @@ handle_pragma_implementation (cpp_reader* /*dfile*/)
     {
       filename = TREE_STRING_POINTER (fname);
       if (cpp_included_before (parse_in, filename, input_location))
-       warning (0, "#pragma implementation for %qs appears after "
+       warning (0, "%<#pragma implementation%> for %qs appears after "
                 "file is included", filename);
     }
 
@@ -568,8 +568,8 @@ unqualified_fn_lookup_error (cp_expr name_expr)
          if (!hint)
            {
              inform (loc, "(if you use %<-fpermissive%>, G++ will accept your "
-                    "code, but allowing the use of an undeclared name is "
-                    "deprecated)");
+                     "code, but allowing the use of an undeclared name is "
+                     "deprecated)");
              hint = true;
            }
        }
index acb81d16b5359cdbe7e20a2c2977b33a93cf75ec..d66482b194dbc19c586cd8dd1f07826a15bd2b7a 100644 (file)
@@ -2305,11 +2305,11 @@ write_type (tree type)
              break;
 
            case TYPEOF_TYPE:
-             sorry ("mangling typeof, use decltype instead");
+             sorry ("mangling %<typeof%>, use %<decltype%> instead");
              break;
 
            case UNDERLYING_TYPE:
-             sorry ("mangling __underlying_type");
+             sorry ("mangling %<__underlying_type%>");
              break;
 
            case LANG_TYPE:
index 31737d1353c7be71124c33362f0aa71842392272..3fb3b5a9091286d9572377367d85f86da2ffa4ed 100644 (file)
@@ -826,13 +826,13 @@ do_build_copy_assign (tree fndecl)
 
          if (CP_TYPE_CONST_P (expr_type))
            {
-             error ("non-static const member %q#D, can%'t use default "
+             error ("non-static const member %q#D, cannot use default "
                     "assignment operator", field);
              continue;
            }
          else if (TYPE_REF_P (expr_type))
            {
-             error ("non-static reference member %q#D, can%'t use "
+             error ("non-static reference member %q#D, cannot use "
                     "default assignment operator", field);
              continue;
            }
@@ -1336,13 +1336,13 @@ walk_field_subobs (tree fields, special_function_kind sfk, tree fnname,
          if (CP_TYPE_CONST_P (mem_type) && !CLASS_TYPE_P (mem_type))
            {
              if (diag)
-               error ("non-static const member %q#D, can%'t use default "
+               error ("non-static const member %q#D, cannot use default "
                       "assignment operator", field);
            }
          else if (TYPE_REF_P (mem_type))
            {
              if (diag)
-               error ("non-static reference member %q#D, can%'t use "
+               error ("non-static reference member %q#D, cannot use "
                       "default assignment operator", field);
            }
          else
@@ -2248,8 +2248,8 @@ defaulted_late_check (tree fn)
       if (!CLASSTYPE_TEMPLATE_INSTANTIATION (ctx))
        {
          error ("explicitly defaulted function %q+D cannot be declared "
-                "as %<constexpr%> because the implicit declaration is not "
-                "%<constexpr%>:", fn);
+                "%qs because the implicit declaration is not %qs:",
+                fn, "constexpr", "constexpr");
          explain_implicit_non_constexpr (fn);
        }
       DECL_DECLARED_CONSTEXPR_P (fn) = false;
index 89d85f6c7d7b1a8e7be9c608d5584acc548b931d..d8d71be98ec2f7776c9d9530759664a10a29e9d5 100644 (file)
@@ -3270,10 +3270,10 @@ cp_binding_level_debug (cp_binding_level *scope, int line, const char *action)
 {
   const char *desc = cp_binding_level_descriptor (scope);
   if (scope->this_entity)
-    verbatim ("%s %<%s(%E)%> %p %d\n", action, desc,
+    verbatim ("%s %<%s(%E)%> %p %d", action, desc,
              scope->this_entity, (void *) scope, line);
   else
-    verbatim ("%s %s %p %d\n", action, desc, (void *) scope, line);
+    verbatim ("%s %s %p %d", action, desc, (void *) scope, line);
 }
 
 /* A chain of binding_level structures awaiting reuse.  */
@@ -7499,7 +7499,7 @@ void
 pop_everything (void)
 {
   if (ENABLE_SCOPE_CHECKING)
-    verbatim ("XXX entering pop_everything ()\n");
+    verbatim ("XXX entering %<pop_everything ()%>");
   while (!namespace_bindings_p ())
     {
       if (current_binding_level->kind == sk_class)
@@ -7508,7 +7508,7 @@ pop_everything (void)
        poplevel (0, 0, 0);
     }
   if (ENABLE_SCOPE_CHECKING)
-    verbatim ("XXX leaving pop_everything ()\n");
+    verbatim ("XXX leaving %<pop_everything ()%>");
 }
 
 /* Emit debugging information for using declarations and directives.
index ab3e672d3286e25d3d7ef12adb6fd9c8dd4eaea6..e6ef5a9bc008e9084242ba98a6bdd083a9ccfd3f 100644 (file)
@@ -1308,7 +1308,7 @@ cp_lexer_start_debugging (cp_lexer* lexer)
 {
   if (!LEXER_DEBUGGING_ENABLED_P)
     fatal_error (input_location,
-                "LEXER_DEBUGGING_ENABLED_P is not set to true");
+                "%<LEXER_DEBUGGING_ENABLED_P%> is not set to true");
 
   lexer->debugging_p = true;
   cp_lexer_debug_stream = stderr;
@@ -1321,7 +1321,7 @@ cp_lexer_stop_debugging (cp_lexer* lexer)
 {
   if (!LEXER_DEBUGGING_ENABLED_P)
     fatal_error (input_location,
-                "LEXER_DEBUGGING_ENABLED_P is not set to true");
+                "%<LEXER_DEBUGGING_ENABLED_P%> is not set to true");
 
   lexer->debugging_p = false;
   cp_lexer_debug_stream = NULL;
@@ -4537,7 +4537,7 @@ cp_parser_userdef_numeric_literal (cp_parser *parser)
   else if (i14)
     {
       inform (token->location, "add %<using namespace std::complex_literals%> "
-             "(from <complex>) to enable the C++14 user-defined literal "
+             "(from %<<complex>%>) to enable the C++14 user-defined literal "
              "suffixes");
       if (ext)
        inform (token->location, "or use %<j%> instead of %<i%> for the "
@@ -6400,7 +6400,7 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
                  == CPP_SCOPE))
            {
              token = cp_lexer_consume_token (parser->lexer);
-             error_at (token->location, "decltype evaluates to %qT, "
+             error_at (token->location, "%<decltype%> evaluates to %qT, "
                        "which is not a class or enumeration type",
                        token->u.tree_check_value->value);
              parser->scope = error_mark_node;
@@ -9671,7 +9671,7 @@ cp_parser_question_colon_clause (cp_parser* parser, cp_expr logical_or_expr)
       && token->type == CPP_COLON)
     {
       pedwarn (token->location, OPT_Wpedantic, 
-               "ISO C++ does not allow ?: with omitted middle operand");
+              "ISO C++ does not allow %<?:%> with omitted middle operand");
       /* Implicit true clause.  */
       expr = NULL_TREE;
       c_inhibit_evaluation_warnings +=
@@ -14442,7 +14442,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 "
+                "%<static_assert%> without a message "
                 "only available with %<-std=c++17%> or %<-std=gnu++17%>");
       /* Eat the ')'  */
       cp_lexer_consume_token (parser->lexer);
@@ -19818,14 +19818,15 @@ cp_parser_asm_definition (cp_parser* parser)
          case RID_VOLATILE:
            if (volatile_loc)
              {
-               error_at (loc, "duplicate asm qualifier %qT", token->u.value);
+               error_at (loc, "duplicate %<asm%> qualifier %qT",
+                         token->u.value);
                inform (volatile_loc, "first seen here");
              }
            else
              {
                if (!parser->in_function_body)
-                 warning_at (loc, 0, "asm qualifier %qT ignored outside of "
-                                     "function body", token->u.value);
+                 warning_at (loc, 0, "%<asm%> qualifier %qT ignored "
+                             "outside of function body", token->u.value);
                volatile_loc = loc;
              }
            cp_lexer_consume_token (parser->lexer);
@@ -19834,7 +19835,8 @@ cp_parser_asm_definition (cp_parser* parser)
          case RID_INLINE:
            if (inline_loc)
              {
-               error_at (loc, "duplicate asm qualifier %qT", token->u.value);
+               error_at (loc, "duplicate %<asm%> qualifier %qT",
+                         token->u.value);
                inform (inline_loc, "first seen here");
              }
            else
@@ -19847,7 +19849,8 @@ cp_parser_asm_definition (cp_parser* parser)
          case RID_GOTO:
            if (goto_loc)
              {
-               error_at (loc, "duplicate asm qualifier %qT", token->u.value);
+               error_at (loc, "duplicate %<asm%> qualifier %qT",
+                         token->u.value);
                inform (goto_loc, "first seen here");
              }
            else
@@ -19859,7 +19862,7 @@ cp_parser_asm_definition (cp_parser* parser)
 
          case RID_CONST:
          case RID_RESTRICT:
-           error_at (loc, "%qT is not an asm qualifier", token->u.value);
+           error_at (loc, "%qT is not an %<asm%> qualifier", token->u.value);
            cp_lexer_consume_token (parser->lexer);
            continue;
 
@@ -19875,7 +19878,7 @@ cp_parser_asm_definition (cp_parser* parser)
 
   if (!parser->in_function_body && (inline_p || goto_p))
     {
-      error_at (first_loc, "asm qualifier outside of function body");
+      error_at (first_loc, "%<asm%> qualifier outside of function body");
       inline_p = goto_p = false;
     }
 
@@ -20257,7 +20260,7 @@ cp_parser_init_declarator (cp_parser* parser,
             on a function-definition.  */
          if (asm_specification)
            error_at (asm_spec_start_token->location,
-                     "an asm-specification is not allowed "
+                     "an %<asm%> specification is not allowed "
                      "on a function-definition");
          if (attributes)
            error_at (attributes_start_token->location,
@@ -27913,12 +27916,12 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser,
        {
          if (cxx_dialect > cxx17)
            error ("literal operator template %qD has invalid parameter list;"
-                  "  Expected non-type template parameter pack <char...> "
+                  " expected non-type template parameter pack %<<char...>%> "
                   "or single non-type parameter of class type",
                   decl);
          else
-           error ("literal operator template %qD has invalid parameter list."
-                  "  Expected non-type template parameter pack <char...>",
+           error ("literal operator template %qD has invalid parameter list;"
+                  " expected non-type template parameter pack %<<char...>%>",
                   decl);
        }
     }
@@ -39634,8 +39637,8 @@ cp_parser_omp_declare_reduction (cp_parser *parser, cp_token *pragma_tok,
        error_at (loc, "reference type %qT in "
                       "%<#pragma omp declare reduction%>", type);
       else if (TYPE_QUALS_NO_ADDR_SPACE (type))
-       error_at (loc, "const, volatile or __restrict qualified type %qT in "
-                      "%<#pragma omp declare reduction%>", type);
+       error_at (loc, "%<const%>, %<volatile%> or %<__restrict%>-qualified "
+                 "type %qT in %<#pragma omp declare reduction%>", type);
       else
        types.safe_push (type);
 
@@ -40486,7 +40489,7 @@ cp_parser_transaction (cp_parser *parser, cp_token *token)
   else if (keyword == RID_ATOMIC_CANCEL)
     {
       /* cancel-and-throw is unimplemented.  */
-      sorry ("atomic_cancel");
+      sorry ("%<atomic_cancel%>");
       noex = NULL_TREE;
     }
   else
index edb0701760a9977ff76849429151905e92723cd7..ab79a9e73fac48a344efb3bb5b37c8267a11f3df 100644 (file)
@@ -1058,10 +1058,11 @@ maybe_process_partial_specialization (tree type)
          if (current_namespace
              != decl_namespace_context (tmpl))
            {
-             permerror (input_location,
-                        "specializing %q#T in different namespace", type);
-             permerror (DECL_SOURCE_LOCATION (tmpl),
-                        "  from definition of %q#D", tmpl);
+             if (permerror (input_location,
+                            "specialization of %qD in different namespace",
+                            type))
+               inform (DECL_SOURCE_LOCATION (tmpl),
+                       "from definition of %q#D", tmpl);
            }
 
          /* Check for invalid specialization after instantiation:
@@ -3606,7 +3607,8 @@ expand_integer_pack (tree call, tree args, tsubst_flags_t complain,
        {
          if ((complain & tf_error)
              && hi != error_mark_node)
-           error ("argument to __integer_pack must be between 0 and %d", max);
+           error ("argument to %<__integer_pack%> must be between 0 and %d",
+                  max);
          return error_mark_node;
        }
 
@@ -4081,7 +4083,7 @@ check_for_bare_parameter_packs (tree t, location_t loc /* = UNKNOWN_LOCATION */)
          if (name)
            inform (loc, "        %qD", name);
          else
-           inform (loc, "        <anonymous>");
+           inform (loc, "        %s", "<anonymous>");
 
           parameter_packs = TREE_CHAIN (parameter_packs);
         }
@@ -6565,7 +6567,7 @@ unify_template_deduction_failure (bool explain_p, tree parm, tree arg)
 {
   if (explain_p)
     inform (input_location,
-           "  can%'t deduce a template for %qT from non-template type %qT",
+           "  cannot deduce a template for %qT from non-template type %qT",
            parm, arg);
   return unify_invalid (explain_p);
 }
index 5588e6abdc55075574b0ead730c15555075765ff..4c44a07f40c50bab57d1a09b7aab71c44f7e4df3 100644 (file)
@@ -218,7 +218,7 @@ reopen_repo_file_for_write (void)
 
   if (repo_file == 0)
     {
-      error ("can%'t create repository information file %qs", repo_name);
+      error ("cannot create repository information file %qs", repo_name);
       flag_use_repository = 0;
     }
 
index 26dae3c3c1a18b73c02d0125a602758a07d2c655..ef78564e88f1aec109d1974ed26ed35a95f8fad2 100644 (file)
@@ -512,7 +512,7 @@ get_typeid (tree type, tsubst_flags_t complain)
          || type_memfn_rqual (type) != REF_QUAL_NONE))
     {
       if (complain & tf_error)
-       error ("typeid of qualified function type %qT", type);
+       error ("%<typeid%> of qualified function type %qT", type);
       return error_mark_node;
     }
 
@@ -693,8 +693,8 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
                {
                  tree expr = throw_bad_cast ();
                   if (complain & tf_warning)
-                    warning (0, "dynamic_cast of %q#D to %q#T can never succeed",
-                             old_expr, type);
+                   warning (0, "%<dynamic_cast<%#T>(%#D)%> can never succeed",
+                            type, old_expr);
                  /* Bash it to the expected type.  */
                  TREE_TYPE (expr) = type;
                  return expr;
@@ -708,8 +708,8 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
                  && TREE_CODE (TREE_TYPE (op)) == RECORD_TYPE)
                {
                   if (complain & tf_warning)
-                    warning (0, "dynamic_cast of %q#D to %q#T can never succeed",
-                             op, type);
+                   warning (0, "%<dynamic_cast<%#T>(%#D)%> can never succeed",
+                            type, op);
                  retval = build_int_cst (type, 0);
                  return retval;
                }
@@ -798,7 +798,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
 
  fail:
   if (complain & tf_error)
-    error ("cannot dynamic_cast %qE (of type %q#T) to type %q#T (%s)",
+    error ("cannot %<dynamic_cast%> %qE (of type %q#T) to type %q#T (%s)",
            old_expr, TREE_TYPE (old_expr), type, errstr);
   return error_mark_node;
 }
index 384593423841da3ac46fafd1a02306e39b2591d1..fc5edde89c37ce28087f436b6efe251cf914566b 100644 (file)
@@ -1585,7 +1585,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
             resolve the overloading.  */
          if (TREE_TYPE (operand) == unknown_type_node)
            {
-             error ("type of asm operand %qE could not be determined",
+             error ("type of %<asm%> operand %qE could not be determined",
                     TREE_VALUE (t));
              operand = error_mark_node;
            }
@@ -1667,7 +1667,7 @@ finish_label_decl (tree name)
 {
   if (!at_function_scope_p ())
     {
-      error ("__label__ declarations are only allowed in function scopes");
+      error ("%<__label__%> declarations are only allowed in function scopes");
       return;
     }
 
@@ -4099,7 +4099,7 @@ finish_bases (tree type, bool direct)
   if (!processing_template_decl)
     {
       /* Parameter packs can only be used in templates */
-      error ("Parameter pack __bases only valid in template declaration");
+      error ("parameter pack %<__bases%> only valid in template declaration");
       return error_mark_node;
     }
 
@@ -4164,7 +4164,7 @@ finish_offsetof (tree object_ptr, tree expr, location_t loc)
       && CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (object_ptr)))
       && CLASSTYPE_NON_STD_LAYOUT (TREE_TYPE (TREE_TYPE (object_ptr)))
       && cp_unevaluated_operand == 0)
-    warning_at (loc, OPT_Winvalid_offsetof, "offsetof within "
+    warning_at (loc, OPT_Winvalid_offsetof, "%<offsetof%> within "
                "non-standard-layout type %qT is conditionally-supported",
                TREE_TYPE (TREE_TYPE (object_ptr)));
   return fold_offsetof (expr);
@@ -5546,8 +5546,8 @@ cp_check_omp_declare_reduction (tree udr)
     }
   else if (TYPE_QUALS_NO_ADDR_SPACE (type))
     {
-      error_at (loc, "const, volatile or __restrict qualified type %qT in "
-                    "%<#pragma omp declare reduction%>", type);
+      error_at (loc, "%<const%>, %<volatile%> or %<__restrict%>-qualified "
+               "type %qT in %<#pragma omp declare reduction%>", type);
       return;
     }
 
@@ -9334,7 +9334,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
          && TYPE_P (TREE_OPERAND (expr, 0))))
     {
       if (complain & tf_error)
-       error ("argument to decltype must be an expression");
+       error ("argument to %<decltype%> must be an expression");
       return error_mark_node;
     }
 
@@ -9362,7 +9362,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
   if (type_unknown_p (expr))
     {
       if (complain & tf_error)
-       error ("decltype cannot resolve address of overloaded function");
+       error ("%<decltype%> cannot resolve address of overloaded function");
       return error_mark_node;
     }
 
index 14d6aff1ccf6ca9bb2c91e842ce5963be80f0f55..8d7f7a2c3e74481f57530dd262d746a78642f29e 100644 (file)
@@ -4472,7 +4472,7 @@ handle_init_priority_attribute (tree* node,
 
   if (!initp_expr || TREE_CODE (initp_expr) != INTEGER_CST)
     {
-      error ("requested init_priority is not an integer constant");
+      error ("requested %<init_priority%> is not an integer constant");
       cxx_constant_value (initp_expr);
       *no_add_attrs = true;
       return NULL_TREE;
@@ -4502,7 +4502,8 @@ handle_init_priority_attribute (tree* node,
 
   if (pri > MAX_INIT_PRIORITY || pri <= 0)
     {
-      error ("requested init_priority is out of range");
+      error ("requested %<init_priority%> %i is out of range [0, %i]",
+            pri, MAX_INIT_PRIORITY);
       *no_add_attrs = true;
       return NULL_TREE;
     }
@@ -4512,7 +4513,8 @@ handle_init_priority_attribute (tree* node,
   if (pri <= MAX_RESERVED_INIT_PRIORITY)
     {
       warning
-       (0, "requested init_priority is reserved for internal use");
+       (0, "requested %<init_priority%> %i is reserved for internal use",
+        pri);
     }
 
   if (SUPPORTS_INIT_PRIORITY)
@@ -5477,7 +5479,7 @@ maybe_warn_zero_as_null_pointer_constant (tree expr, location_t loc)
 void
 lang_check_failed (const char* file, int line, const char* function)
 {
-  internal_error ("lang_* check: failed in %s, at %s:%d",
+  internal_error ("%<lang_*%> check: failed in %s, at %s:%d",
                  function, trim_filename (file), line);
 }
 #endif /* ENABLE_TREE_CHECKING */
index 36e6b2474f0b7f0e93a41b36e239baf4f31c1a83..7289f2c49fc129258506394ae26b7ca0fece19d9 100644 (file)
@@ -4887,7 +4887,7 @@ cp_build_binary_op (const op_location_t &location,
          && c_inhibit_evaluation_warnings == 0
          && (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1)))
        warning (OPT_Wfloat_equal,
-                "comparing floating point with == or != is unsafe");
+                "comparing floating point with %<==%> or %<!=%> is unsafe");
       if (complain & tf_warning)
        {
          tree stripped_orig_op0 = tree_strip_any_location_wrapper (orig_op0);
@@ -6274,7 +6274,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool noconvert,
          if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE
              && (complain & tf_warning)
              && warning_at (location, OPT_Wbool_operation,
-                            "%<~%> on an expression of type bool"))
+                            "%<~%> on an expression of type %<bool%>"))
            inform (location, "did you mean to use logical not (%<!%>)?");
          arg = cp_perform_integral_promotions (arg, complain);
        }
@@ -6942,13 +6942,15 @@ check_for_casting_away_constness (tree src_type, tree dest_type,
       
     case STATIC_CAST_EXPR:
       if (complain & tf_error)
-       error ("static_cast from type %qT to type %qT casts away qualifiers",
+       error ("%<static_cast%> from type %qT to type %qT casts away "
+              "qualifiers",
               src_type, dest_type);
       return true;
       
     case REINTERPRET_CAST_EXPR:
       if (complain & tf_error)
-       error ("reinterpret_cast from type %qT to type %qT casts away qualifiers",
+       error ("%<reinterpret_cast%> from type %qT to type %qT casts away "
+              "qualifiers",
               src_type, dest_type);
       return true;
 
@@ -7401,7 +7403,7 @@ build_static_cast (tree type, tree oexpr, tsubst_flags_t complain)
 
   if (complain & tf_error)
     {
-      error ("invalid static_cast from type %qT to type %qT",
+      error ("invalid %<static_cast%> from type %qT to type %qT",
             TREE_TYPE (expr), type);
       if ((TYPE_PTR_P (type) || TYPE_REF_P (type))
          && CLASS_TYPE_P (TREE_TYPE (type))
@@ -7738,7 +7740,7 @@ build_const_cast_1 (tree dst_type, tree expr, tsubst_flags_t complain,
   if (!INDIRECT_TYPE_P (dst_type) && !TYPE_PTRDATAMEM_P (dst_type))
     {
       if (complain & tf_error)
-       error ("invalid use of const_cast with type %qT, "
+       error ("invalid use of %<const_cast%> with type %qT, "
               "which is not a pointer, "
               "reference, nor a pointer-to-data-member type", dst_type);
       return error_mark_node;
@@ -7747,8 +7749,9 @@ build_const_cast_1 (tree dst_type, tree expr, tsubst_flags_t complain,
   if (TREE_CODE (TREE_TYPE (dst_type)) == FUNCTION_TYPE)
     {
       if (complain & tf_error)
-       error ("invalid use of const_cast with type %qT, which is a pointer "
-              "or reference to a function type", dst_type);
+       error ("invalid use of %<const_cast%> with type %qT, "
+              "which is a pointer or reference to a function type",
+              dst_type);
       return error_mark_node;
     }
 
@@ -7788,7 +7791,8 @@ build_const_cast_1 (tree dst_type, tree expr, tsubst_flags_t complain,
       else
        {
          if (complain & tf_error)
-           error ("invalid const_cast of an rvalue of type %qT to type %qT",
+           error ("invalid %<const_cast%> of an rvalue of type %qT "
+                  "to type %qT",
                   src_type, dst_type);
          return error_mark_node;
        }
@@ -7857,7 +7861,7 @@ build_const_cast_1 (tree dst_type, tree expr, tsubst_flags_t complain,
     }
 
   if (complain & tf_error)
-    error ("invalid const_cast from type %qT to type %qT",
+    error ("invalid %<const_cast%> from type %qT to type %qT",
           src_type, dst_type);
   return error_mark_node;
 }
@@ -9260,7 +9264,7 @@ maybe_warn_about_returning_address_of_local (tree retval)
                    "returning reference to temporary");
       else if (is_std_init_list (valtype))
        warning_at (loc, OPT_Winit_list_lifetime,
-                   "returning temporary initializer_list does not extend "
+                   "returning temporary %<initializer_list%> does not extend "
                    "the lifetime of the underlying array");
       return true;
     }
@@ -9298,7 +9302,7 @@ maybe_warn_about_returning_address_of_local (tree retval)
                        whats_returned);
       else if (is_std_init_list (valtype))
        w = warning_at (loc, OPT_Winit_list_lifetime,
-                       "returning local initializer_list variable %qD "
+                       "returning local %<initializer_list%> variable %qD "
                        "does not extend the lifetime of the underlying array",
                        whats_returned);
       else if (TREE_CODE (whats_returned) == LABEL_DECL)
@@ -9654,7 +9658,7 @@ check_return_expr (tree retval, bool *no_warning)
       && ! flag_check_new
       && retval && null_ptr_cst_p (retval))
     warning (0, "%<operator new%> must not return NULL unless it is "
-            "declared %<throw()%> (or -fcheck-new is in effect)");
+            "declared %<throw()%> (or %<-fcheck-new%> is in effect)");
 
   /* Effective C++ rule 15.  See also start_function.  */
   if (warn_ecpp
index 618eed9a96d4efda39e6ab8d8d04b30ee4eee708..e9f759d4213faa3d324abd85f55a2febc031d245 100644 (file)
@@ -360,7 +360,7 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
             "be used in throw-expression", type);
       break;
     case ACU_CATCH:
-      error ("cannot declare catch parameter to be of abstract "
+      error ("cannot declare %<catch%> parameter to be of abstract "
             "class type %qT", type);
       break;
     default:
@@ -380,7 +380,7 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
       FOR_EACH_VEC_ELT (*pure, ix, fn)
        if (! DECL_CLONED_FUNCTION_P (fn)
            || DECL_COMPLETE_DESTRUCTOR_P (fn))
-         inform (DECL_SOURCE_LOCATION (fn), "\t%#qD", fn);
+         inform (DECL_SOURCE_LOCATION (fn), "    %#qD", fn);
 
       /* Now truncate the vector.  This leaves it non-null, so we know
         there are pure virtuals, but empty so we don't list them out
@@ -1164,8 +1164,8 @@ digest_init_r (tree type, tree init, int nested, int flags,
                 be invalid.  */
              if (size < TREE_STRING_LENGTH (stripped_init))
                {
-                 permerror (loc, "initializer-string for array "
-                            "of chars is too long");
+                 permerror (loc, "initializer-string for %qT is too long",
+                            type);
 
                  init = build_string (size,
                                       TREE_STRING_POINTER (stripped_init));
@@ -2215,7 +2215,7 @@ build_functional_cast (tree exp, tree parms, tsubst_flags_t complain)
          if (type == error_mark_node)
            {
              if (complain & tf_error)
-               error ("cannot deduce template arguments for %qT from ()",
+               error ("cannot deduce template arguments for %qT from %<()%>",
                       anode);
              return error_mark_node;
            }
index d5b53679c8c354f9761aed3f5d34538d75b642a0..b6ac2f8f080a041e8547378a9d383c3c4ee2fe91 100644 (file)
@@ -1,3 +1,18 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * d-builtins.cc (d_init_builtins): Quote keywords, operators,
+        and types in diagnostics.
+        * d-codegen.cc (get_array_length): Same.  Replace can't with cannot.
+        * d-convert.cc (convert_expr): Same.
+        * d-frontend.cc (getTypeInfoType): Quote an option name in
+        a diagnostic.
+        * d-lang.cc (d_handle_option): Same.
+        (d_parse_file): Same.
+        * decl.cc: Remove a trailing period from a diagnostic.
+        * expr.cc: Use a directive for an apostrophe.
+        * toir.cc: Quote keywords, operators, and types in diagnostics.
+        * typeinfo.cc (build_typeinfo): Quote an option name in a diagnostic.
+
 2019-04-25  Johannes Pfau  <johannespfau@gmail.com>
 
        * config-lang.in: Do not add target_libs if phobos is disabled.
index 3dbdafb492a89c5e119e72ea2db475afb096da1f..3ebee721a25bbdedbdad8600bf3548f617315cc8 100644 (file)
@@ -1117,7 +1117,7 @@ d_init_builtins (void)
   Type::tvalist = build_frontend_type (va_list_type_node);
   if (!Type::tvalist)
     {
-      error ("cannot represent built-in va_list type in D");
+      error ("cannot represent built-in %<va_list%> type in D");
       gcc_unreachable ();
     }
 
index 2abff92fc8864b38cebc5defdb5fefc59b59d44a..1971064e334330368855758d865000b9747821b4 100644 (file)
@@ -316,7 +316,7 @@ get_array_length (tree exp, Type *type)
       return d_array_length (exp);
 
     default:
-      error ("can't determine the length of a %qs", type->toChars ());
+      error ("cannot determine the length of a %qs", type->toChars ());
       return error_mark_node;
     }
 }
index e9aa457d852b3d884a5ca01bb06d684d14f97827..b020eab902f801609eb2abd213919a915d9b1c5b 100644 (file)
@@ -376,7 +376,7 @@ convert_expr (tree exp, Type *etype, Type *totype)
        }
       else
        {
-         error ("can't convert a delegate expression to %qs",
+         error ("cannot convert a delegate expression to %qs",
                 totype->toChars ());
          return error_mark_node;
        }
@@ -392,7 +392,7 @@ convert_expr (tree exp, Type *etype, Type *totype)
            }
          else
            {
-             error ("can't convert struct %qs to %qs",
+             error ("cannot convert struct %qs to %qs",
                     etype->toChars (), totype->toChars ());
              return error_mark_node;
            }
@@ -475,7 +475,7 @@ convert_expr (tree exp, Type *etype, Type *totype)
 
          if ((dim * esize) % tsize != 0)
            {
-             error ("cannot cast %qs to %qs since sizes don't line up",
+             error ("cannot cast %qs to %qs since sizes do not line up",
                     etype->toChars (), totype->toChars ());
              return error_mark_node;
            }
index ccd5f50130f6fc824f6ebc05bdeb53bbafca5a30..77b6f22d824007ff21cdb03eca950fbcfe7cbeaa 100644 (file)
@@ -625,7 +625,7 @@ getTypeInfoType (Loc loc, Type *type, Scope *sc)
          if (!warned)
            {
              error_at (make_location_t (loc),
-                       "%<object.TypeInfo%> cannot be used with -fno-rtti");
+                       "%<object.TypeInfo%> cannot be used with %<-fno-rtti%>");
              warned = 1;
            }
        }
index 62a8ddd69b290e10a42243d5fa58ced8ae03a8b7..f23f719a2c377f165eed43948a2af99b10f11bf3 100644 (file)
@@ -449,7 +449,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
          break;
        }
 
-      error ("bad argument for -fdebug %qs", arg);
+      error ("bad argument for %<-fdebug%>: %qs", arg);
       break;
 
     case OPT_fdoc:
@@ -497,7 +497,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
     case OPT_fmodule_file_:
       global.params.modFileAliasStrings->push (arg);
       if (!strchr (arg, '='))
-       error ("bad argument for -fmodule-file %qs", arg);
+       error ("bad argument for %<-fmodule-file%>: %qs", arg);
       break;
 
     case OPT_fmoduleinfo:
@@ -588,7 +588,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
          break;
        }
 
-      error ("bad argument for -fversion %qs", arg);
+      error ("bad argument for %<-fversion%>: %qs", arg);
       break;
 
     case OPT_H:
@@ -1011,7 +1011,7 @@ d_parse_file (void)
   /* In this mode, the first file name is supposed to be a duplicate
      of one of the input files.  */
   if (d_option.fonly && strcmp (d_option.fonly, main_input_filename) != 0)
-    error ("-fonly= argument is different from first input file name");
+    error ("%<-fonly=%> argument is different from first input file name");
 
   for (size_t i = 0; i < num_in_fnames; i++)
     {
index 49723649230367ee7c9d9515ae2f3ea9d90f7fc9..bcce245e59ce2fed506c01ed5e5378880b5d805e 100644 (file)
@@ -463,7 +463,7 @@ public:
                            fd2->toPrettyChars ());
                    inform (make_location_t (d->loc),
                            "use %<alias %s = %s.%s;%> to introduce base class "
-                           "overload set.", fd->toChars (),
+                           "overload set", fd->toChars (),
                            fd->parent->toChars (), fd->toChars ());
                  }
                else
index 6497619e5fdeb130dffe17d48694d9f0dbe67aa1..826c32a059f0de7310bf6a48f3f15e06999838ae 100644 (file)
@@ -1522,7 +1522,7 @@ public:
       }
     else
       {
-       error ("don't know how to delete %qs", e->e1->toChars ());
+       error ("don%'t know how to delete %qs", e->e1->toChars ());
        this->result_ = error_mark_node;
       }
   }
index f1b2e09a94d2158b1bbcd3ffa4ac45cb9c0393c8..1d125b4396253c59ac66d1a9cd7f6400283a9f95 100644 (file)
@@ -367,9 +367,11 @@ public:
       }
 
     if (ent->in_try_scope)
-      error_at (make_location_t (from->loc), "cannot goto into try block");
+      error_at (make_location_t (from->loc),
+               "cannot %<goto%> into %<try%> block");
     else if (ent->in_catch_scope)
-      error_at (make_location_t (from->loc), "cannot goto into catch block");
+      error_at (make_location_t (from->loc),
+               "cannot %<goto%> into %<catch%> block");
   }
 
   /* Check that a previously seen jump to a newly defined label is valid.
@@ -391,21 +393,21 @@ public:
              {
                location = make_location_t (fwdref->statement->loc);
                if (b->kind == level_try)
-                 error_at (location, "cannot goto into try block");
+                 error_at (location, "cannot %<goto%> into %<try%> block");
                else
-                 error_at (location, "cannot goto into catch block");
+                 error_at (location, "cannot %<goto%> into %<catch%> block");
              }
            else if (s->isCaseStatement ())
              {
                location = make_location_t (s->loc);
                error_at (location, "case cannot be in different "
-                         "try block level from switch");
+                         "%<try%> block level from %<switch%>");
              }
            else if (s->isDefaultStatement ())
              {
                location = make_location_t (s->loc);
                error_at (location, "default cannot be in different "
-                         "try block level from switch");
+                         "%<try%> block level from %<switch%>");
              }
            else
              gcc_unreachable ();
@@ -1125,8 +1127,8 @@ public:
        static int warned = 0;
        if (!warned)
          {
-           error_at (make_location_t (s->loc), "exception handling disabled, "
-                     "use -fexceptions to enable");
+           error_at (make_location_t (s->loc), "exception handling disabled; "
+                     "use %<-fexceptions%> to enable");
            warned = 1;
          }
       }
index bbd3961181ddc8ab02086c7fa66eaa5d2e4fbb7e..58c6ce1ba3c7668c91f849ef003b6c4cbb8be6ba 100644 (file)
@@ -1350,7 +1350,7 @@ build_typeinfo (const Loc &loc, Type *type)
       if (!warned)
        {
          error_at (make_location_t (loc),
-                   "%<object.TypeInfo%> cannot be used with -fno-rtti");
+                   "%<object.TypeInfo%> cannot be used with %<-fno-rtti%>");
          warned = 1;
        }
     }
index e5d8ebc6a117d4d19b885dbd95cb64c1d8ae8aae..dced32950c8d3f88f630773efc6a2cee26ebeb0a 100644 (file)
@@ -1115,7 +1115,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
         function anymore.  */
       if (personality && current_unit_personality != personality)
        sorry ("multiple EH personalities are supported only with assemblers "
-              "supporting .cfi_personality directive");
+              "supporting %<.cfi_personality%> directive");
     }
 }
 
index e760c4467ddeda935d6cc172effd7314589041d2..edaeeb4cfd1b8f57e0ad75167302d4e6614e4a3f 100644 (file)
@@ -3412,7 +3412,7 @@ verify_eh_tree (struct function *fun)
          count_r++;
        else
          {
-           error ("region_array is corrupted for region %i", r->index);
+           error ("%<region_array%> is corrupted for region %i", r->index);
            err = true;
          }
       }
@@ -3425,7 +3425,7 @@ verify_eh_tree (struct function *fun)
          count_lp++;
        else
          {
-           error ("lp_array is corrupted for lp %i", lp->index);
+           error ("%<lp_array%> is corrupted for lp %i", lp->index);
            err = true;
          }
       }
@@ -3437,7 +3437,7 @@ verify_eh_tree (struct function *fun)
     {
       if ((*fun->eh->region_array)[r->index] != r)
        {
-         error ("region_array is corrupted for region %i", r->index);
+         error ("%<region_array%> is corrupted for region %i", r->index);
          err = true;
        }
       if (r->outer != outer)
@@ -3456,7 +3456,7 @@ verify_eh_tree (struct function *fun)
        {
          if ((*fun->eh->lp_array)[lp->index] != lp)
            {
-             error ("lp_array is corrupted for lp %i", lp->index);
+             error ("%<lp_array%> is corrupted for lp %i", lp->index);
              err = true;
            }
          if (lp->region != r)
@@ -3493,19 +3493,19 @@ verify_eh_tree (struct function *fun)
     }
   if (count_r != nvisited_r)
     {
-      error ("region_array does not match region_tree");
+      error ("%<region_array%> does not match %<region_tree%>");
       err = true;
     }
   if (count_lp != nvisited_lp)
     {
-      error ("lp_array does not match region_tree");
+      error ("%<lp_array%> does not match %<region_tree%>");
       err = true;
     }
 
   if (err)
     {
       dump_eh_tree (stderr, fun);
-      internal_error ("verify_eh_tree failed");
+      internal_error ("%qs failed", __func__);
     }
 }
 \f
index 057afe66ce73e47424a6c31518a79865452d9733..b8851067cf3ee4e9d008fbabd25bcdccc6ee2c29 100644 (file)
@@ -1,3 +1,7 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+       * gfortranspec.c (append_arg): Spell out the word "argument."
+
 2019-05-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/90329
index 33e6e572b54ac203d2631ae686d633e3c2315402..5b0fe4d7a5f85661fc84362368d96012445ff256 100644 (file)
@@ -143,7 +143,7 @@ append_arg (const struct cl_decoded_option *arg)
     }
 
   if (g77_newargc == newargsize)
-    fatal_error (input_location, "overflowed output arg list for %qs",
+    fatal_error (input_location, "overflowed output argument list for %qs",
                 arg->orig_option_with_args_text);
 
   g77_new_decoded_options[g77_newargc++] = *arg;
index cee9d68cbee39dd9cd1fadf49e0b19e5b3999942..7ebdf1f225b49769af3047c852ad3b72d6912fc0 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3198,7 +3198,7 @@ execute (void)
                                   ? PEX_RECORD_TIMES : 0),
                  progname, temp_filename);
   if (pex == NULL)
-    fatal_error (input_location, "pex_init failed: %m");
+    fatal_error (input_location, "%<pex_init%> failed: %m");
 
   for (i = 0; i < n_commands; i++)
     {
@@ -6138,7 +6138,8 @@ eval_spec_function (const char *func, const char *args,
 
   alloc_args ();
   if (do_spec_2 (args, soft_matched_part) < 0)
-    fatal_error (input_location, "error in args to spec function %qs", func);
+    fatal_error (input_location, "error in arguments to spec function %qs",
+                func);
 
   /* argbuf_index is an index for the next argument to be inserted, and
      so contains the count of the args already inserted.  */
@@ -6923,7 +6924,7 @@ run_attempt (const char **new_argv, const char *out_temp,
 
   pex = pex_init (PEX_USE_PIPES, new_argv[0], NULL);
   if (!pex)
-    fatal_error (input_location, "pex_init failed: %m");
+    fatal_error (input_location, "%<pex_init%> failed: %m");
 
   errmsg = pex_run (pex, pex_flags, new_argv[0],
                    CONST_CAST2 (char *const *, const char **, &new_argv[1]),
@@ -7614,7 +7615,8 @@ driver::set_up_specs () const
       && do_spec_2 (sysroot_suffix_spec, NULL) == 0)
     {
       if (argbuf.length () > 1)
-        error ("spec failure: more than one arg to SYSROOT_SUFFIX_SPEC");
+       error ("spec failure: more than one argument to "
+              "%<SYSROOT_SUFFIX_SPEC%>");
       else if (argbuf.length () == 1)
         target_sysroot_suffix = xstrdup (argbuf.last ());
     }
@@ -7638,7 +7640,8 @@ driver::set_up_specs () const
       && do_spec_2 (sysroot_hdrs_suffix_spec, NULL) == 0)
     {
       if (argbuf.length () > 1)
-        error ("spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC");
+       error ("spec failure: more than one argument "
+              "to %<SYSROOT_HEADERS_SUFFIX_SPEC%>");
       else if (argbuf.length () == 1)
         target_sysroot_hdrs_suffix = xstrdup (argbuf.last ());
     }
@@ -9797,7 +9800,7 @@ compare_debug_auxbase_opt_spec_function (int arg,
   len = strlen (argv[0]);
   if (len < 3 || strcmp (argv[0] + len - 3, ".gk") != 0)
     fatal_error (input_location, "argument to %%:compare-debug-auxbase-opt "
-                "does not end in .gk");
+                "does not end in %<.gk%>");
 
   if (debug_auxbase_opt)
     return debug_auxbase_opt;
index 5bb1ccac6be8a316af847432aa92b1e1cf8fbcaa..c06769ef1c03626ad13cd7eb432ec3c7138de09e 100644 (file)
@@ -70,7 +70,7 @@ unlink_gcda_file (const char *name,
     ret = remove (name);
 
   if (ret)
-    fatal_error (input_location, "error in removing %s\n", name);
+    fatal_error (input_location, "error in removing %s", name);
 
   return ret;
 }
@@ -220,7 +220,7 @@ do_merge (int argc, char **argv)
         case 'w':
           sscanf (optarg, "%d,%d", &w1, &w2);
           if (w1 < 0 || w2 < 0)
-            fatal_error (input_location, "weights need to be non-negative\n");
+           fatal_error (input_location, "weights need to be non-negative");
           break;
         default:
           merge_usage ();
@@ -355,7 +355,7 @@ do_rewrite (int argc, char **argv)
             }
 
           if (scale < 0.0)
-            fatal_error (input_location, "scale needs to be non-negative\n");
+           fatal_error (input_location, "scale needs to be non-negative");
 
           if (normalize_val != 0)
             {
index 7fbdd675005e866d5d06949993ca3a545fe89e1f..ff2771bdc0419e48e98c30790ee6108c35ca0c51 100644 (file)
@@ -4004,7 +4004,8 @@ gcse_or_cprop_is_too_expensive (const char *pass)
   if (memory_request > MAX_GCSE_MEMORY)
     {
       warning (OPT_Wdisabled_optimization,
-              "%s: %d basic blocks and %d registers; increase --param max-gcse-memory above %d",
+              "%s: %d basic blocks and %d registers; "
+              "increase %<--param max-gcse-memory%> above %d",
               pass, n_basic_blocks_for_fn (cfun), max_reg_num (),
               memory_request);
 
index 0d1e5bf2bf5e7d9fbb2b177e4e0bb5a7ba33b499..2acdb6dc60c42fb753c4cde54f7dce051235283a 100644 (file)
@@ -382,7 +382,7 @@ write_pch_globals (const struct ggc_root_tab * const *tab,
            {
              if (fwrite (&ptr, sizeof (void *), 1, state->f)
                  != 1)
-               fatal_error (input_location, "can%'t write PCH file: %m");
+               fatal_error (input_location, "cannot write PCH file: %m");
            }
          else
            {
@@ -390,7 +390,7 @@ write_pch_globals (const struct ggc_root_tab * const *tab,
                saving_htab->find_with_hash (ptr, POINTER_HASH (ptr));
              if (fwrite (&new_ptr->new_addr, sizeof (void *), 1, state->f)
                  != 1)
-               fatal_error (input_location, "can%'t write PCH file: %m");
+               fatal_error (input_location, "cannot write PCH file: %m");
            }
        }
 }
@@ -459,7 +459,7 @@ gt_pch_save (FILE *f)
   for (rt = gt_pch_scalar_rtab; *rt; rt++)
     for (rti = *rt; rti->base != NULL; rti++)
       if (fwrite (rti->base, rti->stride, 1, f) != 1)
-       fatal_error (input_location, "can%'t write PCH file: %m");
+       fatal_error (input_location, "cannot write PCH file: %m");
 
   /* Write out all the global pointers, after translation.  */
   write_pch_globals (gt_ggc_rtab, &state);
@@ -470,17 +470,17 @@ gt_pch_save (FILE *f)
     long o;
     o = ftell (state.f) + sizeof (mmi);
     if (o == -1)
-      fatal_error (input_location, "can%'t get position in PCH file: %m");
+      fatal_error (input_location, "cannot get position in PCH file: %m");
     mmi.offset = mmap_offset_alignment - o % mmap_offset_alignment;
     if (mmi.offset == mmap_offset_alignment)
       mmi.offset = 0;
     mmi.offset += o;
   }
   if (fwrite (&mmi, sizeof (mmi), 1, state.f) != 1)
-    fatal_error (input_location, "can%'t write PCH file: %m");
+    fatal_error (input_location, "cannot write PCH file: %m");
   if (mmi.offset != 0
       && fseek (state.f, mmi.offset, SEEK_SET) != 0)
-    fatal_error (input_location, "can%'t write padding to PCH file: %m");
+    fatal_error (input_location, "cannot write padding to PCH file: %m");
 
   ggc_pch_prepare_write (state.d, state.f);
 
@@ -602,7 +602,7 @@ gt_pch_restore (FILE *f)
   for (rt = gt_pch_scalar_rtab; *rt; rt++)
     for (rti = *rt; rti->base != NULL; rti++)
       if (fread (rti->base, rti->stride, 1, f) != 1)
-       fatal_error (input_location, "can%'t read PCH file: %m");
+       fatal_error (input_location, "cannot read PCH file: %m");
 
   /* Read in all the global pointers, in 6 easy loops.  */
   for (rt = gt_ggc_rtab; *rt; rt++)
@@ -610,10 +610,10 @@ gt_pch_restore (FILE *f)
       for (i = 0; i < rti->nelt; i++)
        if (fread ((char *)rti->base + rti->stride * i,
                   sizeof (void *), 1, f) != 1)
-         fatal_error (input_location, "can%'t read PCH file: %m");
+         fatal_error (input_location, "cannot read PCH file: %m");
 
   if (fread (&mmi, sizeof (mmi), 1, f) != 1)
-    fatal_error (input_location, "can%'t read PCH file: %m");
+    fatal_error (input_location, "cannot read PCH file: %m");
 
   result = host_hooks.gt_pch_use_address (mmi.preferred_base, mmi.size,
                                          fileno (f), mmi.offset);
@@ -623,10 +623,10 @@ gt_pch_restore (FILE *f)
     {
       if (fseek (f, mmi.offset, SEEK_SET) != 0
          || fread (mmi.preferred_base, mmi.size, 1, f) != 1)
-       fatal_error (input_location, "can%'t read PCH file: %m");
+       fatal_error (input_location, "cannot read PCH file: %m");
     }
   else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0)
-    fatal_error (input_location, "can%'t read PCH file: %m");
+    fatal_error (input_location, "cannot read PCH file: %m");
 
   ggc_pch_read (f, mmi.preferred_base);
 
index 143986be58f75f3f15b927dc5113006da53e91d9..7066ef2c488ef5bc5a03eadc4b9d64802affede7 100644 (file)
@@ -2455,7 +2455,7 @@ ggc_pch_write_object (struct ggc_pch_data *d,
     }
 
   if (fwrite (x, size, 1, f) != 1)
-    fatal_error (input_location, "can%'t write PCH file: %m");
+    fatal_error (input_location, "cannot write PCH file: %m");
 
   /* If SIZE is not the same as OBJECT_SIZE(order), then we need to pad the
      object out to OBJECT_SIZE(order).  This happens for strings.  */
@@ -2471,13 +2471,13 @@ ggc_pch_write_object (struct ggc_pch_data *d,
       if (padding <= sizeof (emptyBytes))
         {
           if (fwrite (emptyBytes, 1, padding, f) != padding)
-            fatal_error (input_location, "can%'t write PCH file");
+           fatal_error (input_location, "cannot write PCH file");
         }
       else
         {
           /* Larger than our buffer?  Just default to fseek.  */
           if (fseek (f, padding, SEEK_CUR) != 0)
-            fatal_error (input_location, "can%'t write PCH file");
+           fatal_error (input_location, "cannot write PCH file");
         }
     }
 
@@ -2486,14 +2486,14 @@ ggc_pch_write_object (struct ggc_pch_data *d,
       && fseek (f, ROUND_UP_VALUE (d->d.totals[order] * OBJECT_SIZE (order),
                                   G.pagesize),
                SEEK_CUR) != 0)
-    fatal_error (input_location, "can%'t write PCH file: %m");
+    fatal_error (input_location, "cannot write PCH file: %m");
 }
 
 void
 ggc_pch_finish (struct ggc_pch_data *d, FILE *f)
 {
   if (fwrite (&d->d, sizeof (d->d), 1, f) != 1)
-    fatal_error (input_location, "can%'t write PCH file: %m");
+    fatal_error (input_location, "cannot write PCH file: %m");
   free (d);
 }
 
@@ -2585,7 +2585,7 @@ ggc_pch_read (FILE *f, void *addr)
   /* Allocate the appropriate page-table entries for the pages read from
      the PCH file.  */
   if (fread (&d, sizeof (d), 1, f) != 1)
-    fatal_error (input_location, "can%'t read PCH file: %m");
+    fatal_error (input_location, "cannot read PCH file: %m");
 
   for (i = 0; i < NUM_ORDERS; i++)
     {
index b6c60855351cf3c0f21311d0d4765238c0a4bb79..bc2000d4d80328c3410005c3aea2e4f1a182f0f3 100644 (file)
@@ -6177,7 +6177,7 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
                            fb_lvalue | fb_mayfail);
       if (tret == GS_ERROR)
        {
-         error ("invalid lvalue in asm output %d", i);
+         error ("invalid lvalue in %<asm%> output %d", i);
          ret = tret;
        }
 
@@ -9835,7 +9835,7 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
                    {
                      warning_at (OMP_CLAUSE_LOCATION (c), 0,
                                  "incompatible data clause with reduction "
-                                 "on %qE; promoting to present_or_copy",
+                                 "on %qE; promoting to %<present_or_copy%>",
                                  DECL_NAME (t));
                      OMP_CLAUSE_SET_MAP_KIND (c, GOMP_MAP_TOFROM);
                    }
index edcec10f49fd9963c508f9088a6253435ee72085..f52c49c3fa2a1b4bed776fbd1e452917e0fd3537 100644 (file)
@@ -2264,7 +2264,7 @@ gen_hsa_addr_insns (tree val, hsa_op_reg *dest, hsa_bb *hbb)
     {
       HSA_SORRY_ATV (EXPR_LOCATION (val), "support for HSA does "
                     "not implement taking addresses of complex "
-                    "CONST_DECLs such as %E", val);
+                    "%<CONST_DECL%> such as %E", val);
       return;
     }
 
@@ -2449,7 +2449,7 @@ gen_hsa_insns_for_load (hsa_op_reg *dest, tree rhs, tree type, hsa_bb *hbb)
            {
              HSA_SORRY_ATV (EXPR_LOCATION (rhs),
                             "support for HSA does not implement conversion "
-                            "of %E to the requested non-pointer type.", rhs);
+                            "of %E to the requested non-pointer type", rhs);
              return;
            }
 
@@ -3012,7 +3012,7 @@ gen_hsa_cmp_insn_from_gimple (enum tree_code code, tree lhs, tree rhs,
     default:
       HSA_SORRY_ATV (EXPR_LOCATION (lhs),
                     "support for HSA does not implement comparison tree "
-                    "code %s\n", get_tree_code_name (code));
+                    "code %s", get_tree_code_name (code));
       return;
     }
 
@@ -3162,8 +3162,8 @@ gen_hsa_insns_for_operation_assignment (gimple *assign, hsa_bb *hbb)
     case FLOOR_DIV_EXPR:
     case ROUND_DIV_EXPR:
       HSA_SORRY_AT (gimple_location (assign),
-                   "support for HSA does not implement CEIL_DIV_EXPR, "
-                   "FLOOR_DIV_EXPR or ROUND_DIV_EXPR");
+                   "support for HSA does not implement %<CEIL_DIV_EXPR%>, "
+                   "%<FLOOR_DIV_EXPR%> or %<ROUND_DIV_EXPR%>");
       return;
     case TRUNC_MOD_EXPR:
       opcode = BRIG_OPCODE_REM;
@@ -3172,8 +3172,8 @@ gen_hsa_insns_for_operation_assignment (gimple *assign, hsa_bb *hbb)
     case FLOOR_MOD_EXPR:
     case ROUND_MOD_EXPR:
       HSA_SORRY_AT (gimple_location (assign),
-                   "support for HSA does not implement CEIL_MOD_EXPR, "
-                   "FLOOR_MOD_EXPR or ROUND_MOD_EXPR");
+                   "support for HSA does not implement %<CEIL_MOD_EXPR%>, "
+                   "%<FLOOR_MOD_EXPR%> or %<ROUND_MOD_EXPR%>");
       return;
     case NEGATE_EXPR:
       opcode = BRIG_OPCODE_NEG;
@@ -4188,8 +4188,8 @@ gen_get_level (gimple *stmt, hsa_bb *hbb)
   if (shadow_reg_ptr == NULL)
     {
       HSA_SORRY_AT (gimple_location (stmt),
-                   "support for HSA does not implement omp_get_level called "
-                   "from a function not being inlined within a kernel");
+                   "support for HSA does not implement %<omp_get_level%> "
+                   "called from a function not being inlined within a kernel");
       return;
     }
 
@@ -4230,7 +4230,8 @@ gen_hsa_alloca (gcall *call, hsa_bb *hbb)
   if (lhs == NULL_TREE)
     return;
 
-  built_in_function fn = DECL_FUNCTION_CODE (gimple_call_fndecl (call));
+  tree fndecl = gimple_call_fndecl (call);
+  built_in_function fn = DECL_FUNCTION_CODE (fndecl);
 
   gcc_checking_assert (ALLOCA_FUNCTION_CODE_P (fn));
 
@@ -4243,8 +4244,8 @@ gen_hsa_alloca (gcall *call, hsa_bb *hbb)
        {
          HSA_SORRY_ATV (gimple_location (call),
                         "support for HSA does not implement "
-                        "__builtin_alloca_with_align with a non-constant "
-                        "alignment: %E", alignment_tree);
+                        "%qD with a non-constant alignment %E",
+                        fndecl, alignment_tree);
        }
 
       bit_alignment = tree_to_uhwi (alignment_tree);
@@ -4548,7 +4549,7 @@ omp_simple_builtin::generate (gimple *stmt, hsa_bb *hbb)
        HSA_SORRY_AT (gimple_location (stmt), m_warning_message);
       else
        HSA_SORRY_ATV (gimple_location (stmt),
-                      "Support for HSA does not implement calls to %s\n",
+                      "support for HSA does not implement calls to %qs",
                       m_name);
     }
   else if (m_warning_message != NULL)
@@ -5049,7 +5050,7 @@ gen_hsa_atomic_for_builtin (bool ret_orig, enum BrigAtomicOperation acode,
        {
          HSA_SORRY_ATV (gimple_location (stmt),
                         "support for HSA does not implement memory model for "
-                        "ATOMIC_ST: %s", mmname);
+                        "%<ATOMIC_ST%>: %s", mmname);
          return;
        }
     }
@@ -5314,8 +5315,8 @@ gen_hsa_insns_for_call (gimple *stmt, hsa_bb *hbb)
        gen_hsa_insns_for_direct_call (stmt, hbb);
       else if (!gen_hsa_insns_for_known_library_call (stmt, hbb))
        HSA_SORRY_AT (gimple_location (stmt),
-                     "HSA supports only calls of functions marked with pragma "
-                     "omp declare target");
+                     "HSA supports only calls of functions marked with "
+                     "%<#pragma omp declare target%>");
       return;
     }
 
@@ -5625,7 +5626,7 @@ gen_hsa_insns_for_call (gimple *stmt, hsa_bb *hbb)
     case BUILT_IN_GOMP_PARALLEL:
       HSA_SORRY_AT (gimple_location (stmt),
                    "support for HSA does not implement non-gridified "
-                   "OpenMP parallel constructs.");
+                   "OpenMP parallel constructs");
       break;
 
     case BUILT_IN_OMP_GET_THREAD_NUM:
index c589d70c2bbe6c2edb5de120efbf3ac68323ba9b..1e84d2ee2d149354fb961cd2b3edddb4085a6562 100644 (file)
@@ -1215,7 +1215,8 @@ dump_location_info (FILE *stream)
          if (x == y)
            {
              if (x < MAP_START_LOCATION (map))
-               inform (x, "token %u has x-location == y-location == %u", i, x);
+               inform (x, "token %u has %<x-location == y-location == %u%>",
+                       i, x);
              else
                fprintf (stream,
                         "x-location == y-location == %u encodes token # %u\n",
@@ -1223,8 +1224,8 @@ dump_location_info (FILE *stream)
                }
          else
            {
-             inform (x, "token %u has x-location == %u", i, x);
-             inform (x, "token %u has y-location == %u", i, y);
+             inform (x, "token %u has %<x-location == %u%>", i, x);
+             inform (x, "token %u has %<y-location == %u%>", i, y);
            }
        }
       fprintf (stream, "\n");
index 3e040e273058f27f9aaa595117aff9496baf7f2f..a51b15174225cb18fb4351510530660c43783f3a 100644 (file)
@@ -947,7 +947,7 @@ compare_virtual_tables (varpool_node *prevailing, varpool_node *vtable)
       if (warning_at (DECL_SOURCE_LOCATION
                        (TYPE_NAME (DECL_CONTEXT (vtable->decl))), OPT_Wodr,
                      "virtual table of type %qD violates "
-                     "one definition rule  ",
+                     "one definition rule",
                      DECL_CONTEXT (vtable->decl)))
        {
          if (TREE_CODE (ref1->referred->decl) == FUNCTION_DECL)
index fd481d6e0e2f7a8e4c8f11573d6b94238ee051f0..4a14fb315833ab36829516f5624e1da3fc6d6f5c 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -2326,7 +2326,7 @@ ira_setup_eliminable_regset (void)
              SET_HARD_REG_BIT (ira_no_alloc_regs, eliminables[i].from);
        }
       else if (cannot_elim)
-       error ("%s cannot be used in asm here",
+       error ("%s cannot be used in %<asm%> here",
               reg_names[eliminables[i].from]);
       else
        df_set_regs_ever_live (eliminables[i].from, true);
@@ -2340,7 +2340,7 @@ ira_setup_eliminable_regset (void)
            SET_HARD_REG_BIT (ira_no_alloc_regs, HARD_FRAME_POINTER_REGNUM);
        }
       else if (frame_pointer_needed)
-       error ("%s cannot be used in asm here",
+       error ("%s cannot be used in %<asm%> here",
               reg_names[HARD_FRAME_POINTER_REGNUM]);
       else
        df_set_regs_ever_live (HARD_FRAME_POINTER_REGNUM, true);
index 8b56b58fb2e5e48f9b2aaf9633126f9da254b15a..609feec48ae6dddd1cf2d8df773e002992eb9b5e 100644 (file)
@@ -1692,7 +1692,7 @@ lra_assign (bool &fails_p)
       && (lra_assignment_iter_after_spill
          > LRA_MAX_ASSIGNMENT_ITERATION_NUMBER))
     internal_error
-      ("Maximum number of LRA assignment passes is achieved (%d)\n",
+      ("maximum number of LRA assignment passes is achieved (%d)",
        LRA_MAX_ASSIGNMENT_ITERATION_NUMBER);
   return no_spills_p;
 }
index cf33da8013e4679b0912ad47052956c35839494b..d1d99e01cde01cdd0ebad1efa810cc5c260de221 100644 (file)
@@ -4898,7 +4898,7 @@ lra_constraints (bool first_p)
        }
       if (new_insns_num > MAX_RELOAD_INSNS_NUMBER)
        internal_error
-         ("Max. number of generated reload insns per insn is achieved (%d)\n",
+         ("maximum number of generated reload insns per insn achieved (%d)",
           MAX_RELOAD_INSNS_NUMBER);
       new_insns_num++;
       if (DEBUG_INSN_P (curr_insn))
index 7727b9be760f34e6dcfb49a4c5c7bf0479585e2c..b78b7cb1ad2e5d9a7ef0fdc30916cb1b4ef2507c 100644 (file)
@@ -1700,7 +1700,7 @@ lto_input_mode_table (struct lto_file_decl_data *file_data)
                }
              /* FALLTHRU */
            default:
-             fatal_error (UNKNOWN_LOCATION, "unsupported mode %s\n", mname);
+             fatal_error (UNKNOWN_LOCATION, "unsupported mode %qs", mname);
              break;
            }
        }
index ac971494054914e5b68691bbac8c1e7eb0609628..946897726d03716f7c93f955c438ee4f8190044c 100644 (file)
@@ -155,7 +155,8 @@ get_options_from_collect_gcc_options (const char *collect_gcc,
          do
            {
              if (argv_storage[j] == '\0')
-               fatal_error (input_location, "malformed COLLECT_GCC_OPTIONS");
+               fatal_error (input_location,
+                            "malformed %<COLLECT_GCC_OPTIONS%>");
              else if (strncmp (&argv_storage[j], "'\\''", 4) == 0)
                {
                  argv_storage[k++] = '\'';
@@ -310,7 +311,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
            append_option (decoded_options, decoded_options_count, foption);
          else if (strcmp ((*decoded_options)[j].arg, foption->arg))
            fatal_error (input_location,
-                        "Option %s with different values",
+                        "option %s with different values",
                         foption->orig_option_with_args_text);
          break;
 
@@ -394,7 +395,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options,
            append_option (decoded_options, decoded_options_count, foption);
          else if (foption->value != (*decoded_options)[j].value)
            fatal_error (input_location,
-                        "Option %s not used consistently in all LTO input"
+                        "option %s not used consistently in all LTO input"
                         " files", foption->orig_option_with_args_text);
          break;
 
@@ -822,7 +823,7 @@ compile_offload_image (const char *target, const char *compiler_path,
 
   if (!compiler)
     fatal_error (input_location,
-                "could not find %s in %s (consider using %<-B%>)\n",
+                "could not find %s in %s (consider using %<-B%>)",
                 suffix + 1, compiler_path);
 
   /* Generate temporary output file name.  */
@@ -903,7 +904,7 @@ compile_images_for_offload_targets (unsigned in_argc, char *in_argv[],
                                 linker_opts, linker_opt_count);
       if (!offload_names[next_name_entry])
        fatal_error (input_location,
-                    "problem with building target image for %s\n", names[i]);
+                    "problem with building target image for %s", names[i]);
       next_name_entry++;
     }
 
@@ -960,7 +961,7 @@ find_crtoffloadtable (void)
       }
   if (i == n_paths)
     fatal_error (input_location,
-                "installation error, can%'t find crtoffloadtable.o");
+                "installation error, cannot find %<crtoffloadtable.o%>");
 
   free_array_of_ptrs ((void **) paths, n_paths);
 }
@@ -1072,7 +1073,7 @@ debug_objcopy (const char *infile, bool rename)
                                  &off, &len, &errmsg, &err) != 1)
     {
       if (errmsg)
-       fatal_error (0, "%s: %s\n", errmsg, xstrerror (err));
+       fatal_error (0, "%s: %s", errmsg, xstrerror (err));
 
       simple_object_release_read (inobj);
       close (infd);
@@ -1092,7 +1093,7 @@ debug_objcopy (const char *infile, bool rename)
   if (errmsg)
     {
       unlink_if_ordinary (outfile);
-      fatal_error (0, "%s: %s\n", errmsg, xstrerror (err));
+      fatal_error (0, "%s: %s", errmsg, xstrerror (err));
     }
 
   simple_object_release_read (inobj);
@@ -1144,11 +1145,11 @@ run_gcc (unsigned argc, char *argv[])
   collect_gcc = getenv ("COLLECT_GCC");
   if (!collect_gcc)
     fatal_error (input_location,
-                "environment variable COLLECT_GCC must be set");
+                "environment variable %<COLLECT_GCC%> must be set");
   collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS");
   if (!collect_gcc_options)
     fatal_error (input_location,
-                "environment variable COLLECT_GCC_OPTIONS must be set");
+                "environment variable %<COLLECT_GCC_OPTIONS%> must be set");
   get_options_from_collect_gcc_options (collect_gcc, collect_gcc_options,
                                        CL_LANG_ALL,
                                        &decoded_options,
@@ -1548,7 +1549,7 @@ cont1:
       int priority;
 
       if (!stream)
-       fatal_error (input_location, "fopen: %s: %m", ltrans_output_file);
+       fatal_error (input_location, "%<fopen%>: %s: %m", ltrans_output_file);
 
       /* Parse the list of LTRANS inputs from the WPA stage.  */
       obstack_init (&env_obstack);
@@ -1565,7 +1566,7 @@ cont1:
            {
              if (!feof (stream))
                fatal_error (input_location,
-                            "Corrupted ltrans output file %s",
+                            "corrupted ltrans output file %s",
                             ltrans_output_file);
              break;
            }
@@ -1754,7 +1755,7 @@ main (int argc, char *argv[])
   diagnostic_initialize (global_dc, 0);
 
   if (atexit (lto_wrapper_cleanup) != 0)
-    fatal_error (input_location, "atexit failed");
+    fatal_error (input_location, "%<atexit%> failed");
 
   if (signal (SIGINT, SIG_IGN) != SIG_IGN)
     signal (SIGINT, fatal_signal);
index 64b19420caac8e8fbc51039cf39d876f78a859a8..a3b3c69c4912c2516005be794ca9a40feb4c596d 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * lto-dump.c (lto_main): Same.
+        * lto.c (stream_out): Same.
+
 2019-05-10  Martin Liska  <mliska@suse.cz>
 
        * Make-lang.in: Use program_transform_name for lto-dump.
index 39b442335f6d784ed5635c1dd1a4ff076c718b6c..691d109ff3449409091aea79af03f556efcde3dc 100644 (file)
@@ -320,7 +320,8 @@ lto_main (void)
        node->get_untransformed_body ();
       if (!GATHER_STATISTICS)
        warning_at (input_location, 0,
-                   "Not configured with --enable-gather-detailed-mem-stats.");
+                   "Not configured with "
+                   "%<--enable-gather-detailed-mem-stats%>.");
       else
        dump_gimple_statistics ();
     }
@@ -329,7 +330,8 @@ lto_main (void)
       /* Dump tree statistics.  */
       if (!GATHER_STATISTICS)
        warning_at (input_location, 0,
-                   "Not configured with --enable-gather-detailed-mem-stats.");
+                   "Not configured with "
+                   "%<--enable-gather-detailed-mem-stats%>.");
       else
        {
          printf ("Tree Statistics\n");
index bf7902097016fd2b1f935d7d556f14934c33bcac..814f03a1777a456d44ffe2ae64e1e6af556ee6c2 100644 (file)
@@ -159,7 +159,7 @@ stream_out (char *temp_filename, lto_symtab_encoder_t encoder, int part)
 {
   lto_file *file = lto_obj_file_open (temp_filename, true);
   if (!file)
-    fatal_error (input_location, "lto_obj_file_open() failed");
+    fatal_error (input_location, "%<lto_obj_file_open()%> failed");
   lto_set_current_out_file (file);
 
   gcc_assert (!dump_file);
index af6ac32a785346b070052e1648c03cf9bee144e8..908ea6727800fedeb7c73c02c2efe6ed56076705 100644 (file)
@@ -1,3 +1,15 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * objc-act.c (objc_begin_catch_clause): Quote keywords and options
+        in diagnostics.
+        (objc_build_throw_stmt): Same.
+        (objc_finish_message_expr): Same.
+        (get_super_receiver): Same.
+        * objc-next-runtime-abi-01.c (objc_next_runtime_abi_01_init): Spell
+        out "less than" in English./
+        * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Spell
+        out "greater" in English.
+
 2019-05-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR pch/90326
index 5cf7205c23b87b4020fa8d2e0e6927824cd36af8..7ee330629f751cf1f826a2ed4d774d4d171a52e1 100644 (file)
@@ -458,7 +458,7 @@ objc_write_global_declarations (void)
          char * const dumpname = concat (dump_base_name, ".decl", NULL);
          gen_declaration_file = fopen (dumpname, "w");
          if (gen_declaration_file == 0)
-           fatal_error (input_location, "can%'t open %s: %m", dumpname);
+           fatal_error (input_location, "cannot open %s: %m", dumpname);
          free (dumpname);
        }
 
@@ -4208,13 +4208,13 @@ objc_begin_catch_clause (tree decl)
     }
   else if (!objc_type_valid_for_messaging (type, false))
     {
-      error ("@catch parameter is not a known Objective-C class type");
+      error ("%<@catch%> parameter is not a known Objective-C class type");
       type = error_mark_node;
     }
   else if (TYPE_HAS_OBJC_INFO (TREE_TYPE (type))
           && TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (type)))
     {
-      error ("@catch parameter cannot be protocol-qualified");
+      error ("%<@catch%> parameter cannot be protocol-qualified");
       type = error_mark_node;
     }
   else if (POINTER_TYPE_P (type) && objc_is_object_id (TREE_TYPE (type)))
@@ -4336,7 +4336,8 @@ objc_build_throw_stmt (location_t loc, tree throw_expr)
       if (cur_try_context == NULL
           || cur_try_context->current_catch == NULL)
        {
-         error_at (loc, "%<@throw%> (rethrow) used outside of a @catch block");
+         error_at (loc,
+                   "%<@throw%> (rethrow) used outside of a %<@catch%> block");
          return error_mark_node;
        }
 
@@ -5411,7 +5412,8 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params,
                 prototype.  Emit a warning, then keep going (this
                 will use any method with a matching name, as if the
                 receiver was of type 'Class').  */
-             warning (0, "@interface of class %qE not found", class_tree);
+             warning (0, "%<@interface%> of class %qE not found",
+                      class_tree);
            }
        }
       /* Handle `self' and `super'.  */
@@ -5545,7 +5547,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params,
                     warning, either include an @interface for the
                     class, or cast the receiver to 'id'.  Note that
                     rtype is an IDENTIFIER_NODE at this point.  */
-                 warning (0, "@interface of class %qE not found", rtype);
+                 warning (0, "%<@interface%> of class %qE not found", rtype);
                }
            }
 
@@ -5628,11 +5630,9 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params,
       if (!warn_missing_methods)
        {
          warning_at (input_location,
-                     0, "(Messages without a matching method signature");
-         warning_at (input_location,
-                     0, "will be assumed to return %<id%> and accept");
-         warning_at (input_location,
-                     0, "%<...%> as arguments.)");
+                     0, "(messages without a matching method signature "
+                     "will be assumed to return %<id%> and accept "
+                     "%<...%> as arguments)");
          warn_missing_methods = true;
        }
     }
@@ -8848,7 +8848,7 @@ get_super_receiver (void)
     }
   else
     {
-      error ("[super ...] must appear in a method context");
+      error ("%<[super ...]%> must appear in a method context");
       return error_mark_node;
     }
 }
index 77d2c374bc096b1671adecb310b7fb7c8ba16728..fa83e64b6a132f35c3c6f71269546c653ea35c07 100644 (file)
@@ -150,7 +150,8 @@ objc_next_runtime_abi_01_init (objc_runtime_hooks *rthooks)
     {
       warning_at (UNKNOWN_LOCATION, OPT_Wall,
                "%<-fobjc-sjlj-exceptions%> is the only supported exceptions "
-               "system for %<-fnext-runtime%> with %<-fobjc-abi-version%> < 2");
+               "system for %<-fnext-runtime%> with %<-fobjc-abi-version%> "
+               "argument less than 2");
     }
 
   rthooks->initialize = next_runtime_01_initialize;
index a2214195b2c4a400c3eb5f659e4940223aaebf04..aa1cbde5010d858ec72ef478ba48ef13b2318649 100644 (file)
@@ -241,8 +241,10 @@ objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks)
 
   if (flag_objc_exceptions && flag_objc_sjlj_exceptions)
     {
-      inform (UNKNOWN_LOCATION, "%<-fobjc-sjlj-exceptions%> is ignored for "
-                               "%<-fnext-runtime%> when %<-fobjc-abi-version%> >= 2");
+      inform (UNKNOWN_LOCATION,
+             "%<-fobjc-sjlj-exceptions%> is ignored for "
+             "%<-fnext-runtime%> when %<-fobjc-abi-version%> "
+             "greater than 1");
       flag_objc_sjlj_exceptions = 0;
     }
 
index 71adc21cb26518f9f90cc02522f51200c414c8e8..879ab17c3620ca6e002b46f4f833ed2b4c0f5432 100644 (file)
@@ -1671,7 +1671,8 @@ print_specific_help (unsigned int include_flags,
            description = _("The following options take joined arguments");
          else
            {
-             internal_error ("unrecognized include_flags 0x%x passed to print_specific_help",
+             internal_error ("unrecognized %<include_flags 0x%x%> passed "
+                             "to %<print_specific_help%>",
                              include_flags);
              return;
            }
@@ -1982,7 +1983,7 @@ parse_no_sanitize_attribute (char *value)
 
       if (sanitizer_opts[i].name == NULL)
        warning (OPT_Wattributes,
-                "%<%s%> attribute directive ignored", q);
+                "%qs attribute directive ignored", q);
 
       q = strtok (NULL, ",");
     }
@@ -2165,7 +2166,7 @@ print_help (struct gcc_options *opts, unsigned int lang_mask)
                *pflags |= lang_flag;
              else
                warning (0,
-                        "--help argument %q.*s is ambiguous, "
+                        "%<--help%> argument %q.*s is ambiguous, "
                         "please be more specific",
                         len, a);
            }
@@ -2174,7 +2175,7 @@ print_help (struct gcc_options *opts, unsigned int lang_mask)
        *pflags |= lang_flag;
       else
        warning (0,
-                "unrecognized argument to --help= option: %q.*s",
+                "unrecognized argument to %<--help=%> option: %q.*s",
                 len, a);
 
       if (comma == NULL)
@@ -2831,8 +2832,8 @@ handle_param (struct gcc_options *opts, struct gcc_options *opts_set,
   arg = xstrdup (carg);
   equal = strchr (arg, '=');
   if (!equal)
-    error_at (loc, "%s: --param arguments should be of the form NAME=VALUE",
-             arg);
+    error_at (loc, "%s: %qs arguments should be of the form NAME=VALUE",
+             arg, "--param");
   else
     {
       *equal = '\0';
@@ -2842,10 +2843,10 @@ handle_param (struct gcc_options *opts, struct gcc_options *opts_set,
        {
          const char *suggestion = find_param_fuzzy (arg);
          if (suggestion)
-           error_at (loc, "invalid --param name %qs; did you mean %qs?",
-                     arg, suggestion);
+           error_at (loc, "invalid %qs name %qs; did you mean %qs?",
+                     "--param", arg, suggestion);
          else
-           error_at (loc, "invalid --param name %qs", arg);
+           error_at (loc, "invalid %qs name %qs", "--param", arg);
        }
       else
        {
@@ -2853,7 +2854,7 @@ handle_param (struct gcc_options *opts, struct gcc_options *opts_set,
            value = integral_argument (equal + 1);
 
          if (value == -1)
-           error_at (loc, "invalid --param value %qs", equal + 1);
+           error_at (loc, "invalid %qs value %qs", "--param", equal + 1);
          else
            set_param_value (arg, value,
                             opts->x_param_values, opts_set->x_param_values);
index a9c22889d71d466150a5c7eb84bcb8a1b37bc429..c6331cbc49db0e2fc5fd1c7d0ac7240d3a44c237 100644 (file)
@@ -87,8 +87,8 @@ opt_pass::clone ()
 void
 opt_pass::set_pass_param (unsigned int, bool)
 {
-  internal_error ("pass %s needs a set_pass_param implementation to handle the"
-                 " extra argument in NEXT_PASS", name);
+  internal_error ("pass %s needs a %<set_pass_param%> implementation "
+                 "to handle the extra argument in %<NEXT_PASS%>", name);
 }
 
 bool
index 2896c6a9392d9366e8f12c66657e6e945024c068..a9d3171ecb335b3bd8dd3d2525902cb9eea775c5 100644 (file)
@@ -231,7 +231,7 @@ add_new_plugin (const char* plugin_name)
     {
       plugin = (struct plugin_name_args *) *slot;
       if (strcmp (plugin->full_name, plugin_name))
-        error ("plugin %s was specified with different paths:\n%s\n%s",
+       error ("plugin %qs was specified with different paths: %qs and %qs",
                plugin->base_name, plugin->full_name, plugin_name);
       return;
     }
@@ -290,7 +290,8 @@ parse_plugin_arg_opt (const char *arg)
 
   if (!key_start)
     {
-      error ("malformed option %<-fplugin-arg-%s%> (missing -<key>[=<value>])",
+      error ("malformed option %<-fplugin-arg-%s%>: "
+            "missing %<-<key>[=<value>]%>",
              arg);
       return;
     }
@@ -700,7 +701,7 @@ try_init_one_plugin (struct plugin_name_args *plugin)
   dl_handle = dlopen (plugin->full_name, RTLD_NOW | RTLD_GLOBAL);
   if (!dl_handle)
     {
-      error ("cannot load plugin %s\n%s", plugin->full_name, dlerror ());
+      error ("cannot load plugin %s%s", plugin->full_name, dlerror ());
       return false;
     }
 
@@ -710,7 +711,7 @@ try_init_one_plugin (struct plugin_name_args *plugin)
   /* Check the plugin license.  */
   if (dlsym (dl_handle, str_license) == NULL)
     fatal_error (input_location,
-                "plugin %s is not licensed under a GPL-compatible license\n"
+                "plugin %s is not licensed under a GPL-compatible license"
                 "%s", plugin->full_name, dlerror ());
 
   PTR_UNION_AS_VOID_PTR (plugin_init_union) =
@@ -720,7 +721,7 @@ try_init_one_plugin (struct plugin_name_args *plugin)
   if ((err = dlerror ()) != NULL)
     {
       dlclose(dl_handle);
-      error ("cannot find %s in plugin %s\n%s", str_plugin_init_func_name,
+      error ("cannot find %s in plugin %s%s", str_plugin_init_func_name,
              plugin->full_name, err);
       return false;
     }
@@ -729,7 +730,7 @@ try_init_one_plugin (struct plugin_name_args *plugin)
   if ((*plugin_init) (plugin, &gcc_version))
     {
       dlclose(dl_handle);
-      error ("fail to initialize plugin %s", plugin->full_name);
+      error ("failed to initialize plugin %s", plugin->full_name);
       return false;
     }
   /* leak dl_handle on purpose to ensure the plugin is loaded for the
index 53f7a94c1882018fede19fb5c760e71de65b6b61..3cf34ba99a84b75bdb78e4267e02dbb496cd9f63 100644 (file)
@@ -707,7 +707,7 @@ parse_edge_flag_token (const char *tok)
   } while (0);
 #include "cfg-flags.def"
 #undef DEF_EDGE_FLAG
-  error ("unrecognized edge flag: '%s'", tok);
+  error ("unrecognized edge flag: %qs", tok);
   return 0;
 }
 
@@ -978,7 +978,7 @@ function_reader::parse_enum_value (int num_values, const char *const *strings)
       if (strcmp (name.string, strings[i]) == 0)
        return i;
     }
-  error ("unrecognized enum value: '%s'", name.string);
+  error ("unrecognized enum value: %qs", name.string);
   return 0;
 }
 
index 033c978a12fa3c071c261a7f8b9d384a9c7b35d2..8c934aaf936e945a30e46d34106f3eeafd155544 100644 (file)
@@ -545,7 +545,8 @@ check_asm_stack_operands (rtx_insn *insn)
            for (j = 0; j < n_clobbers; j++)
              if (REGNO (recog_data.operand[i]) == REGNO (clobber_reg[j]))
                {
-                 error_for_asm (insn, "output constraint %d cannot be specified together with \"%s\" clobber",
+                 error_for_asm (insn, "output constraint %d cannot be "
+                                "specified together with %qs clobber",
                                 i, reg_names [REGNO (clobber_reg[j])]);
                  malformed_asm = 1;
                  break;
@@ -568,7 +569,7 @@ check_asm_stack_operands (rtx_insn *insn)
 
   if (i != LAST_STACK_REG + 1)
     {
-      error_for_asm (insn, "output regs must be grouped at top of stack");
+      error_for_asm (insn, "output registers must be grouped at top of stack");
       malformed_asm = 1;
     }
 
@@ -608,7 +609,8 @@ check_asm_stack_operands (rtx_insn *insn)
   if (i != LAST_STACK_REG + 1)
     {
       error_for_asm (insn,
-                    "implicitly popped regs must be grouped at top of stack");
+                    "implicitly popped registers must be grouped "
+                    "at top of stack");
       malformed_asm = 1;
     }
 
@@ -625,7 +627,8 @@ check_asm_stack_operands (rtx_insn *insn)
   if (i != LAST_STACK_REG + 1)
     {
       error_for_asm (insn,
-                    "explicitly used regs must be grouped at top of stack");
+                    "explicitly used registers must be grouped "
+                    "at top of stack");
       malformed_asm = 1;
     }
 
index 4842ce922bc387586702fedd9cf6792bef633531..a18c24f47979b125088c231f7f9b55e85b89ca05 100644 (file)
@@ -1216,8 +1216,8 @@ validate_value_data (struct value_data *vd)
        if (vd->e[i].mode == VOIDmode)
          {
            if (vd->e[i].next_regno != INVALID_REGNUM)
-             internal_error ("validate_value_data: [%u] Bad next_regno for empty chain (%u)",
-                             i, vd->e[i].next_regno);
+             internal_error ("%qs: [%u] bad %<next_regno%> for empty chain (%u)",
+                             __func__, i, vd->e[i].next_regno);
            continue;
          }
 
@@ -1228,11 +1228,11 @@ validate_value_data (struct value_data *vd)
             j = vd->e[j].next_regno)
          {
            if (TEST_HARD_REG_BIT (set, j))
-             internal_error ("validate_value_data: Loop in regno chain (%u)",
-                             j);
+             internal_error ("%qs: loop in %<next_regno%> chain (%u)",
+                             __func__, j);
            if (vd->e[j].oldest_regno != i)
-             internal_error ("validate_value_data: [%u] Bad oldest_regno (%u)",
-                             j, vd->e[j].oldest_regno);
+             internal_error ("%qs: [%u] bad %<oldest_regno%> (%u)",
+                             __func__, j, vd->e[j].oldest_regno);
 
            SET_HARD_REG_BIT (set, j);
          }
@@ -1243,8 +1243,9 @@ validate_value_data (struct value_data *vd)
        && (vd->e[i].mode != VOIDmode
            || vd->e[i].oldest_regno != i
            || vd->e[i].next_regno != INVALID_REGNUM))
-      internal_error ("validate_value_data: [%u] Non-empty reg in chain (%s %u %i)",
-                     i, GET_MODE_NAME (vd->e[i].mode), vd->e[i].oldest_regno,
+      internal_error ("%qs: [%u] non-empty register in chain (%s %u %i)",
+                     __func__, i,
+                     GET_MODE_NAME (vd->e[i].mode), vd->e[i].oldest_regno,
                      vd->e[i].next_regno);
 }
 
index 315c5ecabe6d7bb220f3accc8b01674876606605..bec2d40fe9553fa748723a8006e261e8256493d7 100644 (file)
@@ -717,11 +717,11 @@ fix_register (const char *name, int fixed, int call_used)
                  switch (call_used)
                    {
                    case 0:
-                     error ("can%'t use %qs as a call-saved register", name);
+                     error ("cannot use %qs as a call-saved register", name);
                      break;
 
                    case 1:
-                     error ("can%'t use %qs as a call-used register", name);
+                     error ("cannot use %qs as a call-used register", name);
                      break;
 
                    default:
@@ -733,7 +733,7 @@ fix_register (const char *name, int fixed, int call_used)
                  switch (call_used)
                    {
                    case 1:
-                     error ("can%'t use %qs as a fixed register", name);
+                     error ("cannot use %qs as a fixed register", name);
                      break;
 
                    case 0:
index bb112d817cf596d997ea8fc64a29d09228a0bdf6..5039ceed5816dc5567274ff64e849c2c4f998bb4 100644 (file)
@@ -2062,7 +2062,7 @@ static void
 spill_failure (rtx_insn *insn, enum reg_class rclass)
 {
   if (asm_noperands (PATTERN (insn)) >= 0)
-    error_for_asm (insn, "can%'t find a register in class %qs while "
+    error_for_asm (insn, "cannot find a register in class %qs while "
                   "reloading %<asm%>",
                   reg_class_names[rclass]);
   else
index b69d7c4f2ba0ac43204c14652c0e3492c8365932..8ed3bf5aa2f0fe39c16c1b503090997977fe0788 100644 (file)
@@ -521,7 +521,7 @@ check_unique_operand_names (tree outputs, tree inputs, tree labels)
   return true;
 
  failure:
-  error ("duplicate asm operand name %qs", TREE_STRING_POINTER (i_name));
+  error ("duplicate %<asm%> operand name %qs", TREE_STRING_POINTER (i_name));
   return false;
 }
 
index 02b9dc59611699de7bb637850f927ec752916aa4..577e373c5787e128ba10e37124fbb47af0e75fa3 100644 (file)
@@ -1600,7 +1600,7 @@ default_target_option_pragma_parse (tree ARG_UNUSED (args),
      do not have the "target" pragma.  */
   if (args)
     warning (OPT_Wpragmas,
-            "#pragma GCC target is not supported for this machine");
+            "%<#pragma GCC target%> is not supported for this machine");
 
   return false;
 }
index a15def5c12c67e8826116b64a2fa40c2c6712b05..e1aa25736efb400a9ff965f1ac6b9995faa9360d 100644 (file)
@@ -1,3 +1,123 @@
+2019-05-16  Martin Sebor  <msebor@redhat.com>
+
+        * c-c++-common/Wbool-operation-1.c: Adjust text of expected diagnostics.
+        * c-c++-common/Wvarargs-2.c: Same.
+        * c-c++-common/Wvarargs.c: Same.
+        * c-c++-common/pr51768.c: Same.
+        * c-c++-common/tm/inline-asm.c: Same.
+        * c-c++-common/tm/safe-1.c: Same.
+        * g++.dg/asm-qual-1.C: Same.
+        * g++.dg/asm-qual-3.C: Same.
+        * g++.dg/conversion/dynamic1.C: Same.
+        * g++.dg/cpp0x/constexpr-89599.C: Same.
+        * g++.dg/cpp0x/constexpr-cast.C: Same.
+        * g++.dg/cpp0x/constexpr-shift1.C: Same.
+        * g++.dg/cpp0x/lambda/lambda-conv11.C: Same.
+        * g++.dg/cpp0x/nullptr04.C: Same.
+        * g++.dg/cpp0x/static_assert12.C: Same.
+        * g++.dg/cpp0x/static_assert8.C: Same.
+        * g++.dg/cpp1y/lambda-conv1.C: Same.
+        * g++.dg/cpp1y/pr79393-3.C: Same.
+        * g++.dg/cpp1y/static_assert1.C: Same.
+        * g++.dg/cpp1z/constexpr-if4.C: Same.
+        * g++.dg/cpp1z/constexpr-if5.C: Same.
+        * g++.dg/cpp1z/constexpr-if9.C: Same.
+        * g++.dg/eh/goto2.C: Same.
+        * g++.dg/eh/goto3.C: Same.
+        * g++.dg/expr/static_cast8.C: Same.
+        * g++.dg/ext/flexary5.C: Same.
+        * g++.dg/ext/utf-array-short-wchar.C: Same.
+        * g++.dg/ext/utf-array.C: Same.
+        * g++.dg/ext/utf8-2.C: Same.
+        * g++.dg/gomp/loop-4.C: Same.
+        * g++.dg/gomp/macro-4.C: Same.
+        * g++.dg/gomp/udr-1.C: Same.
+        * g++.dg/init/initializer-string-too-long.C: Same.
+        * g++.dg/other/offsetof9.C: Same.
+        * g++.dg/ubsan/pr63956.C: Same.
+        * g++.dg/warn/Wbool-operation-1.C: Same.
+        * g++.dg/warn/Wtype-limits-Wextra.C: Same.
+        * g++.dg/warn/Wtype-limits.C: Same.
+        * g++.dg/wrappers/pr88680.C: Same.
+        * g++.old-deja/g++.mike/eh55.C: Same.
+        * gcc.dg/Wsign-compare-1.c: Same.
+        * gcc.dg/Wtype-limits-Wextra.c: Same.
+        * gcc.dg/Wtype-limits.c: Same.
+        * gcc.dg/Wunknownprag.c: Same.
+        * gcc.dg/Wunsuffixed-float-constants-1.c: Same.
+        * gcc.dg/asm-6.c: Same.
+        * gcc.dg/asm-qual-1.c: Same.
+        * gcc.dg/cast-1.c: Same.
+        * gcc.dg/cast-2.c: Same.
+        * gcc.dg/cast-3.c: Same.
+        * gcc.dg/cpp/source_date_epoch-2.c: Same.
+        * gcc.dg/debug/pr85252.c: Same.
+        * gcc.dg/dfp/cast-bad.c: Same.
+        * gcc.dg/format/gcc_diag-1.c: Same.
+        * gcc.dg/format/gcc_diag-11.c: Same.New test.
+        * gcc.dg/gcc_diag-11.c: Same.New test.
+        * gcc.dg/gnu-cond-expr-2.c: Same.
+        * gcc.dg/gnu-cond-expr-3.c: Same.
+        * gcc.dg/gomp/macro-4.c: Same.
+        * gcc.dg/init-bad-1.c: Same.
+        * gcc.dg/init-bad-2.c: Same.
+        * gcc.dg/init-bad-3.c: Same.
+        * gcc.dg/pr27528.c: Same.
+        * gcc.dg/pr48552-1.c: Same.
+        * gcc.dg/pr48552-2.c: Same.
+        * gcc.dg/pr59846.c: Same.
+        * gcc.dg/pr61096-1.c: Same.
+        * gcc.dg/pr8788-1.c: Same.
+        * gcc.dg/pr90082.c: Same.
+        * gcc.dg/simd-2.c: Same.
+        * gcc.dg/spellcheck-params-2.c: Same.
+        * gcc.dg/spellcheck-params.c: Same.
+        * gcc.dg/strlenopt-49.c: Same.
+        * gcc.dg/tm/pr52141.c: Same.
+        * gcc.dg/torture/pr51106-1.c: Same.
+        * gcc.dg/torture/pr51106-2.c: Same.
+        * gcc.dg/utf-array-short-wchar.c: Same.
+        * gcc.dg/utf-array.c: Same.
+        * gcc.dg/utf8-2.c: Same.
+        * gcc.dg/warn-sprintf-no-nul.c: Same.
+        * gcc.target/i386/asm-flag-0.c: Same.
+        * gcc.target/i386/inline_error.c: Same.
+        * gcc.target/i386/pr30848.c: Same.
+        * gcc.target/i386/pr39082-1.c: Same.
+        * gcc.target/i386/pr39678.c: Same.
+        * gcc.target/i386/pr57756.c: Same.
+        * gcc.target/i386/pr68843-1.c: Same.
+        * gcc.target/i386/pr79804.c: Same.
+        * gcc.target/i386/pr82673.c: Same.
+        * obj-c++.dg/class-protocol-1.mm: Same.
+        * obj-c++.dg/exceptions-3.mm: Same.
+        * obj-c++.dg/exceptions-4.mm: Same.
+        * obj-c++.dg/exceptions-5.mm: Same.
+        * obj-c++.dg/exceptions-6.mm: Same.
+        * obj-c++.dg/method-12.mm: Same.
+        * obj-c++.dg/method-13.mm: Same.
+        * obj-c++.dg/method-6.mm: Same.
+        * obj-c++.dg/method-7.mm: Same.
+        * obj-c++.dg/method-9.mm: Same.
+        * obj-c++.dg/method-lookup-1.mm: Same.
+        * obj-c++.dg/proto-lossage-4.mm: Same.
+        * obj-c++.dg/protocol-qualifier-2.mm: Same.
+        * objc.dg/call-super-2.m: Same.
+        * objc.dg/class-protocol-1.m: Same.
+        * objc.dg/desig-init-1.m: Same.
+        * objc.dg/exceptions-3.m: Same.
+        * objc.dg/exceptions-4.m: Same.
+        * objc.dg/exceptions-5.m: Same.
+        * objc.dg/exceptions-6.m: Same.
+        * objc.dg/method-19.m: Same.
+        * objc.dg/method-2.m: Same.
+        * objc.dg/method-5.m: Same.
+        * objc.dg/method-6.m: Same.
+        * objc.dg/method-7.m: Same.
+        * objc.dg/method-lookup-1.m: Same.
+        * objc.dg/proto-hier-1.m: Same.
+        * objc.dg/proto-lossage-4.m: Same.
+
 2019-05-17  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>
 
        * g++.dg/eh/o32-fp.C: New.
index 552b044c7bbe04d4c0ee8b2f806f81fdbee53aa4..048918781553317393ae2f874b0f7d9e80cd869d 100644 (file)
@@ -15,18 +15,18 @@ fn (bool b, bool b2, T b3, int n, v4si v)
 {
   int r = 0;
 
-  r += ~b; /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += n + ~b; /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(n == 1); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(n || 1); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~b == 1; /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(++n, n == 1); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(++n, n > 1); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(++n, n && 1); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += (++n, ~b); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~b3; /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~foo (); /* { dg-warning "on an expression of type bool|on a boolean expression" } */
-  r += ~(bool) !1; /* { dg-warning "on an expression of type bool|on a boolean expression" } */
+  r += ~b; /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += n + ~b; /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(n == 1); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(n || 1); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~b == 1; /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(++n, n == 1); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(++n, n > 1); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(++n, n && 1); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += (++n, ~b); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~b3; /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~foo (); /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
+  r += ~(bool) !1; /* { dg-warning "on an expression of type 'bool'|on a boolean expression" } */
 
   v = ~v;
   r += ~(int) b;
index a6b51f19e603b7027196a2c77f09c4967a11c595..08d3b94a0871acef13fd2b18edafd3ce76ae185b 100644 (file)
@@ -9,7 +9,7 @@ void
 err (int a)
 {
   va_list vp;
-  va_start (vp, a); // { dg-error "used in function with fixed args" }
+  va_start (vp, a); // { dg-error "used in function with fixed arguments" }
 }
 
 void
index 71d8c5dff93894f9ebfcf062b67e263c90a3dc12..bfd8276a2920e91095ebb7674017f1279cd1f380 100644 (file)
@@ -6,7 +6,7 @@ void
 err (int a)
 {
   va_list vp;
-  va_start (vp, a); // { dg-error "used in function with fixed args" }
+  va_start (vp, a); // { dg-error "used in function with fixed arguments" }
 }
 
 #pragma GCC diagnostic push
index 862190d609299507406feade8b647c24dbd93972..f891a93ad208b551b1a0cb6767f44efaaa1a4358 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
 /* { dg-prune-output "changes the ABI" } */
 typedef float v2sf __attribute__ ((vector_size (8)));
-v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */
+v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "cannot convert" } */
index 082594ccad7a1aac9b67eba4cecb1bcfc3370fb9..c30039226b39283603186a1c34b3b99d958fb081 100644 (file)
@@ -5,7 +5,7 @@
 void
 foo (void)
 {
-  asm goto ("" : : : : lab, lab, lab2, lab);   /* { dg-error "duplicate asm operand name" } */
+  asm goto ("" : : : : lab, lab, lab2, lab);   /* { dg-error "duplicate 'asm' operand name" } */
 lab:;
 lab2:;
 }
@@ -13,7 +13,7 @@ lab2:;
 void
 bar (void)
 {
-  asm goto ("" : : [lab] "i" (0) : : lab);     /* { dg-error "duplicate asm operand name" } */
+  asm goto ("" : : [lab] "i" (0) : : lab);     /* { dg-error "duplicate 'asm' operand name" } */
 lab:;
 }
 
@@ -21,5 +21,5 @@ void
 baz (void)
 {
   int x;
-  asm ("" : [lab] "=r" (x) : [lab] "r" (x));   /* { dg-error "duplicate asm operand name" } */
+  asm ("" : [lab] "=r" (x) : [lab] "r" (x));   /* { dg-error "duplicate 'asm' operand name" } */
 }
index 52cc2e39af7fe999d0b7e1debc451e593edd9d24..4ffdc59f027ee9a7e9fd645c8d5f403e3e1e9b62 100644 (file)
@@ -35,9 +35,9 @@ int main (int argc, char *argv[]) {
     f1 = ((int)998769576) + f0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" "scalar to vector" { target { ! int16 } } } */
 
     /* convert.c should take care of this.  */
-    i1 = sfl + i0;      /* { dg-error "can't convert value to a vector|invalid operands" } */
-    i1 = 1.5 + i0;      /* { dg-error "can't convert value to a vector|invalid operands" } */
-    v1 = d + v0;        /* { dg-error "can't convert value to a vector|invalid operands" } */
+    i1 = sfl + i0;      /* { dg-error "cannot convert value to a vector|invalid operands" } */
+    i1 = 1.5 + i0;      /* { dg-error "cannot convert value to a vector|invalid operands" } */
+    v1 = d + v0;        /* { dg-error "cannot convert value to a vector|invalid operands" } */
 
     return 0;
 }
index eefd347dc8ff71a1568270c0276337555ed4dd44..73892601897a73ccba6619d2995cbeb9d765d962 100644 (file)
@@ -4,7 +4,7 @@
 static inline void
 inline_death ()
 {
-  __asm__ ("");                        /* { dg-error "asm not allowed" } */
+  __asm__ ("");                        /* { dg-error "'asm' not allowed" } */
 }
 
 void
index 4a81a78c396b1fc190d1268f6fb060a7bd66b1eb..504113e8eff86f3435a6a41b0bae815b25e4bfd5 100644 (file)
@@ -39,8 +39,8 @@ foo(void)
   (*pi)();             /* { dg-error "unsafe indirect function call" } */
   (*pu)();             /* { dg-error "unsafe indirect function call" } */
 
-  asm("");             /* { dg-error "asm not allowed" } */
-  asm("" : "=g"(i));   /* { dg-error "asm not allowed" } */
+  asm("");             /* { dg-error "'asm' not allowed" } */
+  asm("" : "=g"(i));   /* { dg-error "'asm' not allowed" } */
 
   return fc(i);
 }
@@ -62,8 +62,8 @@ bar(void)
   (*pm)();
   (*pu)();             /* { dg-error "unsafe indirect function call" } */
 
-  asm("");             /* { dg-error "asm not allowed" } */
-  asm("" : "=g"(i));   /* { dg-error "asm not allowed" } */
+  asm("");             /* { dg-error "'asm' not allowed" } */
+  asm("" : "=g"(i));   /* { dg-error "'asm' not allowed" } */
 
   return fc(i);
 }
index 3fba592ee991f4a571bb427ce8a9839821f18671..1bb217fa99bfb119580448ca7b4e5cea56d8de0a 100644 (file)
@@ -7,7 +7,7 @@ f ()
 {
   asm volatile ("");
 
-  asm const (""); // { dg-error {'const' is not an asm qualifier} }
+  asm const (""); // { dg-error {'const' is not an 'asm' qualifier} }
 
-  asm __restrict (""); // { dg-error {'__restrict' is not an asm qualifier} }
+  asm __restrict (""); // { dg-error {'__restrict' is not an 'asm' qualifier} }
 }
index 0bf60697ea5ca378015074d7840c8e8969f6057f..80573cb435860fc23e1584df0d3cbed84b4f9b25 100644 (file)
@@ -2,11 +2,11 @@
 // { dg-do compile }
 // { dg-options "-std=gnu++98" }
 
-asm const ("");    // { dg-error {'const' is not an asm qualifier} }
-asm volatile (""); // { dg-warning {asm qualifier 'volatile' ignored outside of function body} }
+asm const ("");    // { dg-error {'const' is not an 'asm' qualifier} }
+asm volatile (""); // { dg-warning {'asm' qualifier 'volatile' ignored outside of function body} }
 asm restrict (""); // { dg-error {expected '\(' before 'restrict'} }
-asm inline ("");   // { dg-error {asm qualifier outside of function body} }
-asm goto ("");     // { dg-error {asm qualifier outside of function body} }
+asm inline ("");   // { dg-error {'asm' qualifier outside of function body} }
+asm goto ("");     // { dg-error {'asm' qualifier outside of function body} }
 
 // There are many other things wrong with this code, so:
 // { dg-excess-errors "" }
index a781cbaa3fbae05553bf9e505276a64f6e0f0ea1..3c8739c542284a0ab939c9e03aa491d68e85b6c7 100644 (file)
@@ -11,5 +11,5 @@ A& bar();
 
 void baz()
 {
-  dynamic_cast<A&>( bar().foo );  // { dg-error "cannot dynamic_cast" }
+  dynamic_cast<A&>( bar().foo );  // { dg-error "cannot 'dynamic_cast'" }
 }
index 07760a302a7bcc34cc9cc1240c210ccc76a5a8c6..010416a77a1447859ba7ebedd3fb1c4490392b30 100644 (file)
@@ -2,5 +2,5 @@
 // { dg-do compile { target c++11 } }
 
 void foo (int x) {}
-constexpr void *arr[2] = { (void*) &foo, (void *) foo };// { dg-error "a reinterpret_cast is not a constant expression" }
-constexpr void *ptr = (void *) &foo;                   // { dg-error "a reinterpret_cast is not a constant expression" }
+constexpr void *arr[2] = { (void*) &foo, (void *) foo };// { dg-error "'reinterpret_cast' is not a constant expression" }
+constexpr void *ptr = (void *) &foo;                   // { dg-error "'reinterpret_cast' is not a constant expression" }
index e0c7ed33ac7159304fea4b6f493cf4c344e2b7f0..da76a3dc7bceb5bb424fc03b623904ce3f7d0dc8 100644 (file)
@@ -7,8 +7,8 @@ int i;
 // The following was accepted due to bug 49171.
 constexpr void *q = reinterpret_cast<void*>(&i);    // { dg-error "not a constant expression" }
 
-constexpr void *r0 = reinterpret_cast<void*>(1);    // { dg-error "not a constant expression|reinterpret_cast from integer to pointer" }
-constexpr void *r1 = reinterpret_cast<void*>(sizeof 'x');  // { dg-error ".reinterpret_cast<void\\*>\\(1\[ul\]\*\\). is not a constant expression" }
+constexpr void *r0 = reinterpret_cast<void*>(1);    // { dg-error "not a constant expression|'reinterpret_cast' from integer to pointer" }
+constexpr void *r1 = reinterpret_cast<void*>(sizeof 'x');  // { dg-error "'reinterpret_cast<void\\*>\\(1\[ul\]\*\\)' is not a constant expression" }
 
 template <class T>
 constexpr bool f ()
index c1cfb1eebdb4a3f521fc335ecb3edd6c70a282e7..1970122f549bfde2731cc1e2f4d8adeb08ab2014 100644 (file)
@@ -11,7 +11,7 @@ constexpr int i1 = fn1 (1, -1); // { dg-message "in .constexpr. expansion of " }
 constexpr int
 fn2 (int i, int j)
 {
-  return i << j; // { dg-error "is >= than the precision of the left operand" }
+  return i << j; // { dg-error "is greater than or equal to the precision .. of the left operand" }
 }
 
 constexpr int i2 = fn2 (1, 200); // { dg-message "in .constexpr. expansion of " }
@@ -43,7 +43,7 @@ constexpr int i5 = fn5 (__INT_MAX__, 1);
 constexpr int
 fn6 (unsigned int i, unsigned int j)
 {
-  return i << j; // { dg-error "is >= than the precision of the left operand" }
+  return i << j; // { dg-error "is greater than or equal to the precision .. of the left operand" }
 }
 
 constexpr int i6 = fn6 (1, -1); // { dg-message "in .constexpr. expansion of " }
@@ -67,7 +67,7 @@ constexpr int i8 = fn8 (-1, 1);
 constexpr int
 fn9 (int i, int j)
 {
-  return i >> j;  // { dg-error "is >= than the precision of the left operand" }
+  return i >> j;  // { dg-error "is greater than or equal to the precision .. of the left operand" }
 }
 
 constexpr int i9 = fn9 (1, 200); // { dg-message "in .constexpr. expansion of " }
index 83e1126dc08b1814323cfb0b15ec826d7a25d24c..ef29f30771db133fe9be9ef26dda788f584aea2f 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile { target c++11 } }
 
-void f(char i, int j) = delete;        // { dg-message "<deleted>" }
+void f(char i, int j) = delete;        // { dg-message "(deleted)" }
 void f(int i, ...);            // { dg-message "void f" }
 
 int main()
index 4b8d6487f5ce1895c38654a754acf54b7ccf225b..ec08f504fab6ed6bfa6cdcc955d5653f38eb8b4e 100644 (file)
@@ -4,7 +4,7 @@
 void foo()
 {
   int i;
-  static_cast<void(*)()>([i]{});  // { dg-error "invalid static_cast" }
-  static_cast<void(*)()>([=]{});  // { dg-error "invalid static_cast" }
-  static_cast<void(*)()>([&]{});  // { dg-error "invalid static_cast" }
+  static_cast<void(*)()>([i]{});  // { dg-error "invalid 'static_cast'" }
+  static_cast<void(*)()>([=]{});  // { dg-error "invalid 'static_cast'" }
+  static_cast<void(*)()>([&]{});  // { dg-error "invalid 'static_cast'" }
 }
index 372ac51cd7b0b4c6e37a3228826032cd0017bc34..2b9017865f7f169a081115ad1772bd1a2e671ac8 100644 (file)
@@ -4,13 +4,13 @@
 
 __extension__ typedef __INTPTR_TYPE__ intptr_t;
 
-const int n4 = static_cast<const int>(nullptr); // { dg-error "invalid static_cast " }
+const int n4 = static_cast<const int>(nullptr); // { dg-error "invalid 'static_cast' " }
 const short int n5 = reinterpret_cast<short int>(nullptr); // { dg-error "loses precision" }
 const intptr_t n6 = reinterpret_cast<intptr_t>(nullptr);
 const intptr_t n7 = (intptr_t)nullptr;
 
 decltype(nullptr) mynull = 0;
-const int n8 = static_cast<const int>(mynull); // { dg-error "invalid static_cast " }
+const int n8 = static_cast<const int>(mynull); // { dg-error "invalid 'static_cast' " }
 const short int n9 = reinterpret_cast<short int>(mynull); // { dg-error "loses precision" }
 const intptr_t n10 = reinterpret_cast<intptr_t>(mynull);
 const intptr_t n11 = (intptr_t)mynull;
index 5d59e540910e4f37487d7b410b626b488c63d9e4..2ff5e0092a5d90dcc6d624e4c9e50af687d7942c 100644 (file)
@@ -27,4 +27,4 @@ main()
   float_thing(1);
 }
 
-// { dg-warning "static_assert without a message only available with " "" { target *-*-* } 21 }
+// { dg-warning "'static_assert' without a message only available with " "" { target *-*-* } 21 }
index 239fe17e273e22c65eec5d2566d85581bedb23ee..bca38ffa89a7ee19add8f6a04a93e99974b8dbe3 100644 (file)
@@ -6,4 +6,4 @@ static_assert (1 == 0,); // { dg-error "expected string-literal before '\\)'" }
 
 static_assert (1 == 0, "oops"); // { dg-error "static assertion failed" }
 
-// { dg-error "static_assert without a message only available with " "" { target { ! c++17 } } 3 }
+// { dg-error "'static_assert' without a message only available with " "" { target { ! c++17 } } 3 }
index 2e4ec4964d5b6e24570ae1cccedc9571dbaffdf6..25721259c6be7c1e3b25daa82474a993d418d2c3 100644 (file)
@@ -4,10 +4,10 @@
 void foo()
 {
   int i;
-  static_cast<void(*)(int)>([i](auto){});  // { dg-error "invalid static_cast" }
-  static_cast<void(*)(int)>([=](auto){});  // { dg-error "invalid static_cast" }
-  static_cast<void(*)(int)>([&](auto){});  // { dg-error "invalid static_cast" }
-  static_cast<float(*)(float)>([i](auto x){ return x; });  // { dg-error "invalid static_cast" }
-  static_cast<float(*)(float)>([=](auto x){ return x; });  // { dg-error "invalid static_cast" }
-  static_cast<float(*)(float)>([&](auto x){ return x; });  // { dg-error "invalid static_cast" }
+  static_cast<void(*)(int)>([i](auto){});  // { dg-error "invalid 'static_cast'" }
+  static_cast<void(*)(int)>([=](auto){});  // { dg-error "invalid 'static_cast'" }
+  static_cast<void(*)(int)>([&](auto){});  // { dg-error "invalid 'static_cast'" }
+  static_cast<float(*)(float)>([i](auto x){ return x; });  // { dg-error "invalid 'static_cast'" }
+  static_cast<float(*)(float)>([=](auto x){ return x; });  // { dg-error "invalid 'static_cast'" }
+  static_cast<float(*)(float)>([&](auto x){ return x; });  // { dg-error "invalid 'static_cast'" }
 }
index 23dc265090097ba07764028407948bbc0eda033f..3c73cbbb65936a06a03449113f0dbe63a94febf5 100644 (file)
@@ -18,7 +18,7 @@ struct B : virtual A
 };
 
 B::~B () {
-  throw 1; // { dg-warning "will always call terminate" }
+  throw 1; // { dg-warning "will always call 'terminate'" }
 }
 
 struct C : virtual A
index ef655f490977e128fbadcb7d613599ea30ee7781..06815fdace2165eed600b444dd1243a8b4592cb6 100644 (file)
@@ -28,4 +28,4 @@ main()
   float_thing(1);
 }
 
-// { dg-warning "static_assert without a message only available with " "" { target *-*-* } 21 }
+// { dg-warning "'static_assert' without a message only available with " "" { target *-*-* } 21 }
index 612eff83b1e82fdccdfcfc19d2f46d4ea937ee82..871e31a286d8c35ffa2fb114e0f0d3507a389067 100644 (file)
@@ -4,7 +4,7 @@
 void f()
 {
   goto l;                      // { dg-message "from here" }
-  if constexpr (false)         // { dg-message "enters constexpr if" }
+  if constexpr (false)         // { dg-message "enters 'constexpr if'" }
     {
     l:;                                // { dg-error "jump to label" }
     }
index 69d03e3c8b88d48ea8ba3a66c3fcb1d892b152d8..9d30b0e32f62e1f894dbac0a6ebea87337c34c20 100644 (file)
@@ -3,7 +3,7 @@
 
 void f()
 {
-  if constexpr (false)         // { dg-message "enters constexpr if" }
+  if constexpr (false)         // { dg-message "enters 'constexpr if'" }
     {
       goto l;                  // { dg-message "from here" }
     }
index 748278af8c97579aa56f9fb02b6a82b9298aca42..8aa87f74437306c477cd99af52459a02a6168cdb 100644 (file)
@@ -4,7 +4,7 @@
 void f(int i)
 {
   switch (i)
-    if constexpr (false)       // { dg-message "enters constexpr if" }
+    if constexpr (false)       // { dg-message "enters 'constexpr if'" }
       {
       case 42:;                        // { dg-error "jump to case label" }
       }
index 1cd254c0404c7cf5d9ad0de865f54d586dfa73fc..7f22f50315ff2c32b6eb8b60b787df4ba5f473e2 100644 (file)
@@ -8,6 +8,6 @@ try
   } catch (...)
   {
   l2: ;            // { dg-error "jump to label 'l2'" }
-                   // { dg-message "enters catch block" "" { target *-*-*} .-1 }
-    goto l1;       // { dg-message "from here|enters try block" }
+                   // { dg-message "enters 'catch' block" "" { target *-*-*} .-1 }
+    goto l1;       // { dg-message "from here|enters 'try' block" }
   }
index 250324e08f41a5baaa1bebfbd1dea9e0cffa7454..415782cfd1f82fe4bfd1ca5763efe8a86d85c5cd 100644 (file)
@@ -9,6 +9,6 @@ try
   } catch (...)
   {
   l2: ;            // { dg-error "jump to label 'l2'" }
-                  // { dg-message "enters catch block" "" { target *-*-*} .-1 }
-    goto l1;       // { dg-message "from here|enters try block" }
+                  // { dg-message "enters 'catch' block" "" { target *-*-*} .-1 }
+    goto l1;       // { dg-message "from here|enters 'try' block" }
   }
index dc4d2162d6c2ceabd8e9e63eac6d2baa86b5e6b3..6dd7560136c9c525303c81a5991883850579cd13 100644 (file)
@@ -9,9 +9,9 @@ extern C* c;
 
 void pointers(C* c, A2* a2, B1* b1)
 {
-  (void) static_cast<A1*>(c);  // { dg-error "invalid static_cast" }
-  (void) static_cast<C*>(a2);  // { dg-error "invalid static_cast" }
-  (void) static_cast<B2*>(b1); // { dg-error "invalid static_cast" }
+  (void) static_cast<A1*>(c);  // { dg-error "invalid 'static_cast'" }
+  (void) static_cast<C*>(a2);  // { dg-error "invalid 'static_cast'" }
+  (void) static_cast<B2*>(b1); // { dg-error "invalid 'static_cast'" }
 }
 
 struct D1; // { dg-message "note: class type 'D1' is incomplete" }
@@ -21,7 +21,7 @@ struct E2; // { dg-message "note: class type 'E2' is incomplete" }
 
 void references(C& c, D2& d2, E1& e1)
 {
-  (void) static_cast<D1&>(c);  // { dg-error "invalid static_cast" }
-  (void) static_cast<C&>(d2);  // { dg-error "invalid static_cast" }
-  (void) static_cast<E2&>(e1); // { dg-error "invalid static_cast" }
+  (void) static_cast<D1&>(c);  // { dg-error "invalid 'static_cast'" }
+  (void) static_cast<C&>(d2);  // { dg-error "invalid 'static_cast'" }
+  (void) static_cast<E2&>(e1); // { dg-error "invalid 'static_cast'" }
 }
index d6d8e32818f4bbf078674d5d65ef9b384f96fcb1..d5ec13204966983e7e2ba3b2220aa6187390c02f 100644 (file)
@@ -62,7 +62,7 @@ ASSERT_AT_END (D4, a);
 // below is benign since GCC computes the expected value.
 struct D5: E1, E2, NE { char a[]; };
 
-ASSERT_AT_END (D5, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D5, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct A2x_1 {
   size_t n;
@@ -166,29 +166,29 @@ struct A5x {
 
 struct D22: A5x, E1, E2 { };
 
-ASSERT_AT_END (D22, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D22, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct D23: E1, A5x, E2 { };
 
-ASSERT_AT_END (D23, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D23, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct D24: E1, E2, A5x { };
 
-ASSERT_AT_END (D24, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D24, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct DA5x: A5x { };
 
 struct D25: DA5x, E1, E2 { };
 
-ASSERT_AT_END (D25, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D25, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct D26: E1, DA5x, E2 { };
 
-ASSERT_AT_END (D26, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D26, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 struct D27: E1, E2, DA5x { };
 
-ASSERT_AT_END (D27, a);   // { dg-warning "offsetof within non-standard-layout" }
+ASSERT_AT_END (D27, a);   // { dg-warning "'offsetof' within non-standard-layout" }
 
 // Verfify that a flexible array member is diagnosed even when deep
 // in the base class hierarchy.
index f37f93c8b73299e2175a5e810075a322ca076561..8f0a7327ab2efaf77668ee7f4fd7626b89f178cd 100644 (file)
@@ -21,9 +21,9 @@ const char16_t        s16_2[] = U"ab";        /* { dg-error "from a string literal with type a
 const char16_t s16_3[] = L"ab";        /* { dg-error "from a string literal with type array of .wchar_t." } */
 const char16_t s16_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char16_t s16_5[0] = u"ab";       /* { dg-error "chars is too long" } */
-const char16_t s16_6[1] = u"ab";       /* { dg-error "chars is too long" } */
-const char16_t s16_7[2] = u"ab";       /* { dg-error "chars is too long" } */
+const char16_t s16_5[0] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[0]' is too long" } */
+const char16_t s16_6[1] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[1]' is too long" } */
+const char16_t s16_7[2] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[2]' is too long" } */
 const char16_t s16_8[3] = u"ab";
 const char16_t s16_9[4] = u"ab";
 
@@ -33,9 +33,9 @@ const char32_t        s32_2[] = U"ab";
 const char32_t s32_3[] = L"ab";        /* { dg-error "from a string literal with type array of .wchar_t." } */
 const char32_t s32_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char32_t s32_5[0] = U"ab";       /* { dg-error "chars is too long" } */
-const char32_t s32_6[1] = U"ab";       /* { dg-error "chars is too long" } */
-const char32_t s32_7[2] = U"ab";       /* { dg-error "chars is too long" } */
+const char32_t s32_5[0] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[0]' is too long" } */
+const char32_t s32_6[1] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[1]' is too long" } */
+const char32_t s32_7[2] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[2]' is too long" } */
 const char32_t s32_8[3] = U"ab";
 const char32_t s32_9[4] = U"ab";
 
index 0e403db7e05e283118da5297912dd5ad63039041..e539cd45063832bc8c96f1f470034e84fe0b65cd 100644 (file)
@@ -21,9 +21,9 @@ const char16_t        s16_2[] = U"ab";        /* { dg-error "from a string literal with type a
 const char16_t s16_3[] = L"ab";        /* { dg-error "from a string literal with type array of .wchar_t." } */
 const char16_t s16_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char16_t s16_5[0] = u"ab";       /* { dg-error "chars is too long" } */
-const char16_t s16_6[1] = u"ab";       /* { dg-error "chars is too long" } */
-const char16_t s16_7[2] = u"ab";       /* { dg-error "chars is too long" } */
+const char16_t s16_5[0] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[0]' is too long" } */
+const char16_t s16_6[1] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[1]' is too long" } */
+const char16_t s16_7[2] = u"ab";       /* { dg-error "initializer-string for 'const char16_t \\\[2]' is too long" } */
 const char16_t s16_8[3] = u"ab";
 const char16_t s16_9[4] = u"ab";
 
@@ -33,9 +33,9 @@ const char32_t        s32_2[] = U"ab";
 const char32_t s32_3[] = L"ab";        /* { dg-error "from a string literal with type array of .wchar_t." } */
 const char32_t s32_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char32_t s32_5[0] = U"ab";       /* { dg-error "chars is too long" } */
-const char32_t s32_6[1] = U"ab";       /* { dg-error "chars is too long" } */
-const char32_t s32_7[2] = U"ab";       /* { dg-error "chars is too long" } */
+const char32_t s32_5[0] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[0]' is too long" } */
+const char32_t s32_6[1] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[1]' is too long" } */
+const char32_t s32_7[2] = U"ab";       /* { dg-error "initializer-string for 'const char32_t \\\[2]' is too long" } */
 const char32_t s32_8[3] = U"ab";
 const char32_t s32_9[4] = U"ab";
 
index b13d55f1139ba75315a2547881f829c3c1b39ce7..1db5c383fd6ef257f23466004b20fce3fc559e69 100644 (file)
@@ -12,16 +12,16 @@ const char16_t      s1[]    = u8"ab";       // { dg-error "from a string literal with type arr
 const char32_t  s2[]    = u8"ab";      // { dg-error "from a string literal with type array of .char." }
 const wchar_t   s3[]    = u8"ab";      // { dg-error "from a string literal with type array of .char." }
 
-const u8_char_t      t0[0]   = u8"ab"; // { dg-error "chars is too long" }
-const u8_char_t      t1[1]   = u8"ab"; // { dg-error "chars is too long" }
-const u8_char_t      t2[2]   = u8"ab"; // { dg-error "chars is too long" }
+const u8_char_t      t0[0]   = u8"ab"; // { dg-error "initializer-string for 'const u8_char_t \\\[0]' {aka 'const char \\\[0]'} is too long" }
+const u8_char_t      t1[1]   = u8"ab"; // { dg-error "initializer-string for 'const u8_char_t \\\[1]' {aka 'const char \\\[1]'} is too long" }
+const u8_char_t      t2[2]   = u8"ab"; // { dg-error "initializer-string for 'const u8_char_t \\\[2]' {aka 'const char \\\[2]'} is too long" }
 const u8_char_t      t3[3]   = u8"ab";
 const u8_char_t      t4[4]   = u8"ab";
 
-const u8_char_t      u0[0]   = u8"\u2160.";    // { dg-error "chars is too long" }
-const u8_char_t      u1[1]   = u8"\u2160.";    // { dg-error "chars is too long" }
-const u8_char_t      u2[2]   = u8"\u2160.";    // { dg-error "chars is too long" }
-const u8_char_t      u3[3]   = u8"\u2160.";    // { dg-error "chars is too long" }
-const u8_char_t      u4[4]   = u8"\u2160.";    // { dg-error "chars is too long" }
+const u8_char_t      u0[0]   = u8"\u2160.";    // { dg-error "initializer-string for 'const u8_char_t \\\[0]' {aka 'const char \\\[0]'} is too long" }
+const u8_char_t      u1[1]   = u8"\u2160.";    // { dg-error "initializer-string for 'const u8_char_t \\\[1]' {aka 'const char \\\[1]'} is too long" }
+const u8_char_t      u2[2]   = u8"\u2160.";    // { dg-error "initializer-string for 'const u8_char_t \\\[2]' {aka 'const char \\\[2]'} is too long" }
+const u8_char_t      u3[3]   = u8"\u2160.";    // { dg-error "initializer-string for 'const u8_char_t \\\[3]' {aka 'const char \\\[3]'} is too long" }
+const u8_char_t      u4[4]   = u8"\u2160.";    // { dg-error "initializer-string for 'const u8_char_t \\\[4]' {aka 'const char \\\[4]'} is too long" }
 const u8_char_t      u5[5]   = u8"\u2160.";
 const u8_char_t      u6[6]   = u8"\u2160.";
index cd85dbdb9899802c285bf608fad5771262ae9117..c45d43efe8af8329c29fb5d4872281d2c218f837 100644 (file)
@@ -81,28 +81,28 @@ f0 ()
   for (i = 64; i != 0; i += k)
     ;
   #pragma omp for
-  for (i = 0; i != 64; i += m) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 0; i != 64; i += m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 64; i != 0; i -= m) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 64; i != 0; i -= m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 0; i != 64; i -= n) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 0; i != 64; i -= n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 64; i != 0; i += n) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 64; i != 0; i += n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 0; i != 64; i += o) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 0; i != 64; i += o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 64; i != 0; i -= o) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 64; i != 0; i -= o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 0; i != 64; i -= p) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 0; i != 64; i -= p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = 64; i != 0; i += p) // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = 64; i != 0; i += p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
 }
 
@@ -165,63 +165,63 @@ f1 (I<int> &x, I<int> &y, I<int> &u, I<int> &v)
   for (i = y; i != x; i = l + i)
     ;
   #pragma omp for
-  for (i = x; i != y; i = i + 2)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = i + 2)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = 7 + i)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = 7 + i)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = i - 2)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = i - 2)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = -7 + i)      // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = -7 + i)      // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = i + m)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = i + m)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = m + i)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = m + i)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = i - m)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = i - m)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = -m + i)      // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = -m + i)      // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = i - n)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = i - n)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = -n + i)      // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = -n + i)      // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = i + n)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = i + n)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = n + i)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = n + i)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = i + o)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = i + o)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = o + i)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = o + i)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = i - o)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = i - o)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = -o + i)      // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = -o + i)      // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = i - p)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = i - p)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = x; i != y; i = -p + i)      // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = x; i != y; i = -p + i)      // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = i + p)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = i + p)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
   #pragma omp for
-  for (i = y; i != x; i = p + i)       // { dg-error "increment is not constant 1 or -1 for != condition" }
+  for (i = y; i != x; i = p + i)       // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
     ;
 }
index 6a69f1a3ca1cc53cd6ab8bb92a42870463d22dc6..dcc8bcbc8e5ca5557fcf31ff49c9b0abad7ecd10 100644 (file)
@@ -10,9 +10,9 @@ void bar (void);
 void
 foo (void)
 {
-#pragma omp p          // { dg-warning "-:ignoring #pragma omp _Pragma" }
+#pragma omp p          // { dg-warning "-:ignoring '#pragma omp _Pragma'" }
     bar ();
-  omp_p                        // { dg-warning "-:ignoring #pragma omp _Pragma" }
+  omp_p                        // { dg-warning "-:ignoring '#pragma omp _Pragma'" }
     bar ();
 }
 
@@ -22,8 +22,8 @@ foo (void)
 void
 baz (void)
 {
-#pragma omp parallel   // { dg-warning "-:ignoring #pragma omp serial" }
+#pragma omp parallel   // { dg-warning "-:ignoring '#pragma omp serial'" }
     bar ();
-  omp_parallel         // { dg-warning "-:ignoring #pragma omp serial" }
+  omp_parallel         // { dg-warning "-:ignoring '#pragma omp serial'" }
     bar ();
 }
index 10c1c8dab92ea48b265b4da8c56c28f54dfa1d60..c07a89b9d6ac26754ac440ae2168d870bb8f74d6 100644 (file)
@@ -86,11 +86,11 @@ namespace N5
 namespace N6
 {
   struct A { int a; A () : a (0) {} };
-  #pragma omp declare reduction (| : const A : omp_out.a |= omp_in.a)  // { dg-error "const, volatile or __restrict" }
-  #pragma omp declare reduction (+ : __const A : omp_out.a += omp_in.a)        // { dg-error "const, volatile or __restrict" }
+  #pragma omp declare reduction (| : const A : omp_out.a |= omp_in.a)  // { dg-error "'const', 'volatile' or '__restrict'" }
+  #pragma omp declare reduction (+ : __const A : omp_out.a += omp_in.a)        // { dg-error "'const', 'volatile' or '__restrict'" }
   typedef volatile A T;
-  #pragma omp declare reduction (min : T : omp_out.a += omp_in.a)      // { dg-error "const, volatile or __restrict" }
-  #pragma omp declare reduction (* : A *__restrict : omp_out->a *= omp_in->a)// { dg-error "const, volatile or __restrict" }
+  #pragma omp declare reduction (min : T : omp_out.a += omp_in.a)      // { dg-error "'const', 'volatile' or '__restrict'" }
+  #pragma omp declare reduction (* : A *__restrict : omp_out->a *= omp_in->a)// { dg-error "'const', 'volatile' or '__restrict'" }
 }
 namespace N7
 {
@@ -98,21 +98,21 @@ namespace N7
   template <typename T1, typename T2, typename T3, typename T4>
   struct S
   {
-    #pragma omp declare reduction (| : T1 : omp_out |= omp_in)         // { dg-error "const, volatile or __restrict" }
-    #pragma omp declare reduction (+ : T2 : omp_out += omp_in)         // { dg-error "const, volatile or __restrict" }
+    #pragma omp declare reduction (| : T1 : omp_out |= omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
+    #pragma omp declare reduction (+ : T2 : omp_out += omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
     typedef T3 T;
-    #pragma omp declare reduction (min : T : omp_out += omp_in)                // { dg-error "const, volatile or __restrict" }
-    #pragma omp declare reduction (* : T4 : omp_out *= omp_in)         // { dg-error "const, volatile or __restrict" }
+    #pragma omp declare reduction (min : T : omp_out += omp_in)                // { dg-error "'const', 'volatile' or '__restrict'" }
+    #pragma omp declare reduction (* : T4 : omp_out *= omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
   };
   S<const A, __const A, volatile A, A *__restrict> s;
   template <typename T1, typename T2, typename T3, typename T4>
   int foo ()
   {
-    #pragma omp declare reduction (| : T1 : omp_out |= omp_in)         // { dg-error "const, volatile or __restrict" }
-    #pragma omp declare reduction (+ : T2 : omp_out += omp_in)         // { dg-error "const, volatile or __restrict" }
+    #pragma omp declare reduction (| : T1 : omp_out |= omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
+    #pragma omp declare reduction (+ : T2 : omp_out += omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
     typedef T3 T;
-    #pragma omp declare reduction (min : T : omp_out += omp_in)                // { dg-error "const, volatile or __restrict" }
-    #pragma omp declare reduction (* : T4 : omp_out *= omp_in)         // { dg-error "const, volatile or __restrict" }
+    #pragma omp declare reduction (min : T : omp_out += omp_in)                // { dg-error "'const', 'volatile' or '__restrict'" }
+    #pragma omp declare reduction (* : T4 : omp_out *= omp_in)         // { dg-error "'const', 'volatile' or '__restrict'" }
     return 0;
   }
   int x = foo <const A, __const A, volatile A, A *__restrict> ();
index c4ce468bae42d03d60c851d4b4fb48c427d7e8bd..064e1ace4664df6b2080b0369900548fb6da9cde 100644 (file)
@@ -2,7 +2,7 @@
 
 /* Verify that we highlight *which* string is too long.  */
 
-char test[3][4] = { "ok", "too long", "ok" }; // { dg-error "initializer-string for array of chars is too long" }
+char test[3][4] = { "ok", "too long", "ok" }; // { dg-error "initializer-string for 'char \\\[4]' is too long" }
 /* { dg-begin-multiline-output "" }
  char test[3][4] = { "ok", "too long", "ok" };
                            ^~~~~~~~~~
index bd80fa5e2cf0663f3a2a501d50e6fddae31c5995..1936f2e5f76106545d6b0e5134f7ff24ed7fcf35 100644 (file)
@@ -4,14 +4,14 @@
 
 struct A { int i; };
 struct B : virtual A { };
-__SIZE_TYPE__ s = __builtin_offsetof (B, A::i);        // { dg-warning "offsetof within non-standard-layout type" }
+__SIZE_TYPE__ s = __builtin_offsetof (B, A::i);        // { dg-warning "'offsetof' within non-standard-layout type" }
 
 template <typename T>
 __SIZE_TYPE__
 foo ()
 {
-  return __builtin_offsetof (T, A::i)          // { dg-warning "offsetof within non-standard-layout type" }
-        + __builtin_offsetof (B, A::i);        // { dg-warning "offsetof within non-standard-layout type" }
+  return __builtin_offsetof (T, A::i)          // { dg-warning "'offsetof' within non-standard-layout type" }
+        + __builtin_offsetof (B, A::i);        // { dg-warning "'offsetof' within non-standard-layout type" }
 }
 
 __SIZE_TYPE__ t = foo<B> ();
index 34b5dd71ec2d142393db869a485015283468bf8d..cd67c32a547a744eb16d4ca88943d6faa2bef67a 100644 (file)
@@ -11,7 +11,7 @@ fn1 (int a, int b)
   if (b != 2)
     a <<= b;
     // { dg-error "5 << -2.. is negative" "" { target *-*-* } .-1 }
-    // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } .-2 }
+    // { dg-error "is greater than or equal to the precision of the left operand" "" { target *-*-* } .-2 }
     // { dg-error "-2 << 4.. is negative" "" { target *-*-* } .-3 }
   return a;
 }
@@ -34,7 +34,7 @@ fn2 (int a, int b)
   if (b != 2)
     a >>= b;
     // { dg-error "4 >> -1.. is negative" "" { target *-*-* } .-1 }
-    // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } .-2 }
+    // { dg-error "is greater than or equal to the precision of the left operand" "" { target *-*-* } .-2 }
 
   return a;
 }
index 4512b85828704e7fc1470599109ced843efdb6bf..82e9ead445d032b7b31e84e3c989c83791f6994d 100644 (file)
@@ -6,6 +6,6 @@ template <class c>
 decltype (~c{})
 call ()
 {
-  return ~false; // { dg-warning "on an expression of type bool" }
+  return ~false; // { dg-warning "on an expression of type 'bool'" }
 }
 template int call<bool>();
index 0cee96a8a9885145801b42e6b58c51b2c1ffce8b..99e1e89b4b765388fbfa41b5f68ab57caf1f5bfb 100644 (file)
@@ -30,10 +30,10 @@ void b (unsigned short x)
 
 void c (unsigned int x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
   if (1U >= 0) return;
   if (1U < 0) return;
   if (0 <= 1U) return;
@@ -42,18 +42,18 @@ void c (unsigned int x)
 
 void d (unsigned long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 void e (unsigned long long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 int test (int x) 
index 7919a42c83453ec6818c99ecfdd399d79f093280..6a968d953dbb5a9661580db0a65ec576b9ee9a85 100644 (file)
@@ -30,10 +30,10 @@ void b (unsigned short x)
 
 void c (unsigned int x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
   if (1U >= 0) return;
   if (1U < 0) return;
   if (0 <= 1U) return;
@@ -42,18 +42,18 @@ void c (unsigned int x)
 
 void d (unsigned long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 void e (unsigned long long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 int test (int x) 
index 1bd6292857d15cf0360aac827fdbf80eb597abf5..8f8bdd6359ee266ab8cfac53c6d27987c307b35d 100644 (file)
@@ -27,9 +27,9 @@ void test(unsigned n)
     return;
   if (N >= FOO)
     return;
-  if (n >= 0) // { dg-warning ">= 0 is always true" }
+  if (n >= 0) // { dg-warning "'>= 0' is always true" }
     return;
-  if (n < 0) // { dg-warning "< 0 is always false" }
+  if (n < 0) // { dg-warning "'< 0' is always false" }
     return;
   if (n >= FOO)
     return;
@@ -45,9 +45,9 @@ void test(unsigned n)
     return;
   if (0 <= FOO)
     return;
-  if (0 <= n) // { dg-warning ">= 0 is always true" }
+  if (0 <= n) // { dg-warning "'>= 0' is always true" }
     return;
-  if (0 > n) // { dg-warning "< 0 is always false" }
+  if (0 > n) // { dg-warning "'< 0' is always false" }
     return;
   if (N <= FOO)
     return;
index af43f66b1ba34d8edcf4473822de90488e04f436..5835c963be625bfc5e9c994bb8d1ee69ec6919a2 100644 (file)
@@ -9,7 +9,7 @@ void my_terminate_handler() {
 }
 
 void throw_an_unexpected_exception() throw() {
-  throw 1;     // { dg-warning "throw will always call terminate" "" { target c++17 } }
+  throw 1;     // { dg-warning "'throw' will always call 'terminate'" "" { target c++17 } }
 }
 
 int main() {
index be3bd2fcbd8d9febc336e72cac8b9165d2e3ca06..b40bc6c5fee7c9a97050c9f118ac7516af3eb128 100644 (file)
@@ -5,7 +5,7 @@
 unsigned int
 f0 (int x, unsigned int y)
 {
-  return x ? y : -1; /* { dg-warning "18:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+  return x ? y : -1; /* { dg-warning "18:operand of '\\?:' changes signedness from 'int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return x ? y : -1;
                   ^~
@@ -15,7 +15,7 @@ f0 (int x, unsigned int y)
 unsigned int
 f1 (int xxx, unsigned int yyy)
 {
-  return xxx ? yyy : -1; /* { dg-warning "22:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+  return xxx ? yyy : -1; /* { dg-warning "22:operand of '\\?:' changes signedness from 'int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? yyy : -1;
                       ^~
@@ -25,7 +25,7 @@ f1 (int xxx, unsigned int yyy)
 unsigned int
 f2 (int xxx, unsigned int yyy)
 {
-  return xxx ? -1 : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+  return xxx ? -1 : yyy; /* { dg-warning "16:operand of '\\?:' changes signedness from 'int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? -1 : yyy;
                 ^~
@@ -35,7 +35,7 @@ f2 (int xxx, unsigned int yyy)
 unsigned int
 f3 (unsigned int yyy)
 {
-  return yyy ?: -1; /* { dg-warning "17:operand of \\?: changes signedness from 'int' to 'unsigned int'" } */
+  return yyy ?: -1; /* { dg-warning "17:operand of '\\?:' changes signedness from 'int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return yyy ?: -1;
                  ^~
@@ -45,7 +45,7 @@ f3 (unsigned int yyy)
 unsigned int
 f4 (int xxx, unsigned yyy, short uuu)
 {
-  return xxx ? yyy : uuu; /* { dg-warning "22:operand of \\?: changes signedness from 'short int' to 'unsigned int'" } */
+  return xxx ? yyy : uuu; /* { dg-warning "22:operand of '\\?:' changes signedness from 'short int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? yyy : uuu;
                       ^~~
@@ -55,7 +55,7 @@ f4 (int xxx, unsigned yyy, short uuu)
 unsigned int
 f5 (int xxx, unsigned yyy, short uuu)
 {
-  return xxx ? uuu : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'short int' to 'unsigned int'" } */
+  return xxx ? uuu : yyy; /* { dg-warning "16:operand of '\\?:' changes signedness from 'short int' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? uuu : yyy;
                 ^~~
@@ -65,7 +65,7 @@ f5 (int xxx, unsigned yyy, short uuu)
 unsigned int
 f6 (int xxx, unsigned yyy, signed char uuu)
 {
-  return xxx ? yyy : uuu; /* { dg-warning "22:operand of \\?: changes signedness from 'signed char' to 'unsigned int'" } */
+  return xxx ? yyy : uuu; /* { dg-warning "22:operand of '\\?:' changes signedness from 'signed char' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? yyy : uuu;
                       ^~~
@@ -75,7 +75,7 @@ f6 (int xxx, unsigned yyy, signed char uuu)
 unsigned int
 f7 (int xxx, unsigned yyy, signed char uuu)
 {
-  return xxx ? uuu : yyy; /* { dg-warning "16:operand of \\?: changes signedness from 'signed char' to 'unsigned int'" } */
+  return xxx ? uuu : yyy; /* { dg-warning "16:operand of '\\?:' changes signedness from 'signed char' to 'unsigned int'" } */
 /* { dg-begin-multiline-output "" }
    return xxx ? uuu : yyy;
                 ^~~
index e5e7f9444767cbb23b5d6fdf768e7383a7b23cbd..d04ecb7f3448b569948cab7eb214c2352fbbcd79 100644 (file)
@@ -21,22 +21,22 @@ void a (unsigned char x)
 }
 
 void b (unsigned short x)
-{                    /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
+{                    /* { dg-warning "comparison of unsigned expression '< 0' is always false" "" { target { ! int32plus } } .+1 } */
   if (x < 0)  return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
-                     /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression '>= 0' is always true" "" { target { ! int32plus } } .+1 } */
   if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
-                     /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression '< 0' is always false" "" { target { ! int32plus } } .+1 } */
   if (0 > x)  return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
-                     /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression '>= 0' is always true" "" { target { ! int32plus } } .+1 } */
   if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
 }
 
 void c (unsigned int x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
   if (1U >= 0) return;
   if (1U < 0) return;
   if (0 <= 1U) return;
@@ -45,18 +45,18 @@ void c (unsigned int x)
 
 void d (unsigned long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 void e (unsigned long long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 int test (int x) 
index 2d6f9910d447fe91418d0e8294ac6c282abd1762..6a596fc3a3c819babcef3fe3afc66c6b0710b9f0 100644 (file)
@@ -21,22 +21,22 @@ void a (unsigned char x)
 }
 
 void b (unsigned short x)
-{                    /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
+{                    /* { dg-warning "comparison of unsigned expression in '< 0' is always false" "" { target { ! int32plus } } .+1 } */
   if (x < 0)  return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
-                     /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression in '>= 0' is always true" "" { target { ! int32plus } } .+1 } */
   if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */  
-                     /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression in '< 0' is always false" "" { target { ! int32plus } } .+1 } */
   if (0 > x)  return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
-                     /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
+                     /* { dg-warning "comparison of unsigned expression in '>= 0' is always true" "" { target { ! int32plus } } .+1 } */
   if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
 }
 
 void c (unsigned int x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
   if (1U >= 0) return;
   if (1U < 0) return;
   if (0 <= 1U) return;
@@ -45,18 +45,18 @@ void c (unsigned int x)
 
 void d (unsigned long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 void e (unsigned long long x)
 {
-  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
-  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */
-  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */
+  if (x < 0)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (x >= 0) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
+  if (0 > x)  return;/* { dg-warning "comparison of unsigned expression in '< 0' is always false" } */
+  if (0 <= x) return;/* { dg-warning "comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 int test (int x) 
index 3514825a97e19e1c72638fd870e412e1c5594b33..158cab71511954f39fe091f0bbd7951bc4ec4421 100644 (file)
@@ -5,7 +5,7 @@
 
 /* We used to get "unspellable token: CPP_EOF" warnings.  */
 
-#pragma                                /* { dg-warning "-:ignoring #pragma" } */
-#pragma ~                      /* { dg-warning "-:ignoring #pragma" } */
-#pragma baz                    /* { dg-warning "-:ignoring #pragma" } */
-#pragma baz baz                        /* { dg-warning "-:ignoring #pragma" } */
+#pragma                                /* { dg-warning "-:ignoring '#pragma" } */
+#pragma ~                      /* { dg-warning "-:ignoring '#pragma" } */
+#pragma baz                    /* { dg-warning "-:ignoring '#pragma" } */
+#pragma baz baz                        /* { dg-warning "-:ignoring '#pragma baz baz'" } */
index b4a38d5cb106bc9643cb6f82e19554ddcdb7666b..ba992c45c03d91b16b69894e0fe4fc2e987899bb 100644 (file)
@@ -8,8 +8,8 @@ double a = 1.1d;
 /* With FLOAT_CONST_DECIMAL64 switched to ON these would have type
    _Decimal64.  */
 
-double b = VAL;                /* { dg-warning "unsuffixed float constant" } */
-double c = 1.2;                /* { dg-warning "unsuffixed float constant" } */
+double b = VAL;                /* { dg-warning "unsuffixed floating constant" } */
+double c = 1.2;                /* { dg-warning "unsuffixed floating constant" } */
 
 /* With FLOAT_CONST_DECIMAL64 switched to ON these are still binary.  */
 
index 9c0ac1eb27e4908b9a3e1609406c7ea046fae43c..10983c77c5537b77fbfbfab25a3047257617fc90 100644 (file)
@@ -2,6 +2,6 @@
 void foo ()
 {
   int i;
-  __asm__ ("" : [data] "=r" (i) : [data] "i" (100)); /* { dg-error "duplicate asm operand" } */
+  __asm__ ("" : [data] "=r" (i) : [data] "i" (100)); /* { dg-error "duplicate 'asm' operand" } */
   __asm__ ("%[foo]" :: [bar] "i" (1)); /* { dg-error "undefined named operand" } */
 }
index eff6b45d2170e643b31f7f6504f35ece0fffa620..7e216877637a2b0005a94b678217491fdc64af92 100644 (file)
@@ -8,7 +8,7 @@ f (void)
 {
   asm volatile ("");
 
-  asm const (""); /* { dg-error {'const' is not an asm qualifier} } */
+  asm const (""); /* { dg-error {'const' is not a valid 'asm' qualifier} } */
 
-  asm restrict (""); /* { dg-error {'restrict' is not an asm qualifier} } */
+  asm restrict (""); /* { dg-error {'restrict' is not a valid 'asm' qualifier} } */
 }
index 84f4523e58ed24e0eeb5650460ba262bf9e1574d..2571ab8a6836490631b29fbd1e04af6d5fd41014 100644 (file)
@@ -23,14 +23,14 @@ A (16385) void* fpv_16kp1 (void);    /* { dg-warning ".assume_aligned. attribute
 
 A (32767) void* fpv_32km1 (void);     /* { dg-warning ".assume_aligned. attribute argument 32767 is not a power of 2" } */
 
-A (4, -1) void* fpv_4_m1 (void);      /* { dg-warning ".assume_aligned. attribute argument -1 is not in the range \\\[0, 4\\\)" } */
+A (4, -1) void* fpv_4_m1 (void);      /* { dg-warning ".assume_aligned. attribute argument -1 is not in the range \\\[0, 3]" } */
 
 A (4, 0) void* fpv_4_0 (void);
 A (4, 1) void* fpv_4_1 (void);
 A (4, 2) void* fpv_4_2 (void);
 A (4, 3) void* fpv_4_3 (void);
 
-A (4, 4) void* fpv_4_3 (void);        /* { dg-warning ".assume_aligned. attribute argument 4 is not in the range \\\[0, 4\\\)" } */
+A (4, 4) void* fpv_4_3 (void);        /* { dg-warning ".assume_aligned. attribute argument 4 is not in the range \\\[0, 3]" } */
 
 A (4) void* gpv_4_3 (void);
 A (2) void* gpv_4_3 (void);
index 50239ce2eba246be27c6bcca948712242ba6e3a1..210659d724c7d23d82d2a138abe5e286fe7ea595 100644 (file)
@@ -7,22 +7,22 @@
 __extension__ typedef __INTPTR_TYPE__ intptr_t;
 
 /* PR 29116.  */
-int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */
+int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|cannot be evaluated" } */
 
 /* PR 31871.  */
-extern int c[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+extern int c[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|cannot be evaluated" } */
 
 /* Implicit conversions from floating-point constants are not OK,
    although explicit ones are.  */
-extern int c1[1.0 ? 1 : 0]; /* { dg-error "variab|can't be evaluated" } */
+extern int c1[1.0 ? 1 : 0]; /* { dg-error "variab|cannot be evaluated" } */
 
 extern int c2[(int)1.0 ? 1 : 0];
 
-extern int c3[1.0 && 1]; /* { dg-error "variab|can't be evaluated" } */
+extern int c3[1.0 && 1]; /* { dg-error "variab|cannot be evaluated" } */
 
 extern int c4[(int)1.0 && 1];
 
-extern int c5[1.0 || 1]; /* { dg-error "variab|can't be evaluated" } */
+extern int c5[1.0 || 1]; /* { dg-error "variab|cannot be evaluated" } */
 
 extern int c6[(int)1.0 || 1];
 
@@ -46,7 +46,7 @@ enum f {
 void
 f (int a)
 {
-  int v[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+  int v[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|cannot be evaluated" } */
   switch (a)
     {
     case (n * 0 + 1): /* { dg-error "constant" } */
index 7b12ad9f561bb9e9e65183023861316f1b7b1bef..19ed4f4208d665aa910d938dbf93fad9325fdaa6 100644 (file)
@@ -24,8 +24,8 @@ f (void)
   (union u) l; /* { dg-error "cast to union type from type not present in union" } */
   (int) sv; /* { dg-error "aggregate value used where an integer was expected" } */
   (int) uv; /* { dg-error "aggregate value used where an integer was expected" } */
-  (float) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (float) uv; /* { dg-error "aggregate value used where a float was expected" } */
+  (float) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (float) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
   (_Complex double) sv; /* { dg-error "aggregate value used where a complex was expected" } */
   (_Complex double) uv; /* { dg-error "aggregate value used where a complex was expected" } */
   (void *) sv; /* { dg-error "cannot convert to a pointer type" } */
index f7f58f8a41cd619b5619370cfa523284ca96011a..24f63b2e8d46d2bfa7fe356b5b613e3026c5df51 100644 (file)
@@ -24,8 +24,8 @@ f (void)
   (union u) l; /* { dg-error "cast to union type from type not present in union" } */
   (int) sv; /* { dg-error "aggregate value used where an integer was expected" } */
   (int) uv; /* { dg-error "aggregate value used where an integer was expected" } */
-  (float) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (float) uv; /* { dg-error "aggregate value used where a float was expected" } */
+  (float) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (float) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
   (_Complex double) sv; /* { dg-error "aggregate value used where a complex was expected" } */
   (_Complex double) uv; /* { dg-error "aggregate value used where a complex was expected" } */
   (void *) sv; /* { dg-error "cannot convert to a pointer type" } */
index 40d3c88c68097a179ec2ba059c61d51b22d0dd83..d8ae3a0fce27ea837b1e2a0c624cc0679791150a 100644 (file)
@@ -24,8 +24,8 @@ f (void)
   (union u) l; /* { dg-error "cast to union type from type not present in union" } */
   (int) sv; /* { dg-error "aggregate value used where an integer was expected" } */
   (int) uv; /* { dg-error "aggregate value used where an integer was expected" } */
-  (float) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (float) uv; /* { dg-error "aggregate value used where a float was expected" } */
+  (float) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (float) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
   (_Complex double) sv; /* { dg-error "aggregate value used where a complex was expected" } */
   (_Complex double) uv; /* { dg-error "aggregate value used where a complex was expected" } */
   (void *) sv; /* { dg-error "cannot convert to a pointer type" } */
index ae18362ae87d61dc35fee2b60a27b3d9aed8ac61..2ca8fa32d3e10aa6439a13fbb2367ad598c53d99 100644 (file)
@@ -6,7 +6,7 @@
 int
 main(void)
 {
-  __builtin_printf ("%s %s\n", __DATE__, __TIME__); /* { dg-error "SOURCE_DATE_EPOCH must expand" } */
+  __builtin_printf ("%s %s\n", __DATE__, __TIME__); /* { dg-error "environment variable 'SOURCE_DATE_EPOCH' must expand" } */
   __builtin_printf ("%s %s\n", __DATE__, __TIME__);
   return 0;
 }
index 6e5ca85bc868c968b91ee52eb39a14bb5368abbb..9bd4d48d618bd9ac9a3bfdebb4893787afbdd59c 100644 (file)
@@ -5,7 +5,7 @@ void
 foo (void)
 {
   static char a[0] = "";
-  static char b[0] = "b";      /* { dg-warning "initializer-string for array of chars is too long" } */
+  static char b[0] = "b";      /* { dg-warning "initializer-string for array of 'char' is too long" } */
   static char c[1] = "c";
-  static char d[1] = "de";     /* { dg-warning "initializer-string for array of chars is too long" } */
+  static char d[1] = "de";     /* { dg-warning "initializer-string for array of 'char' is too long" } */
 }
index e9e31ff306763037b10ebb0cd4b21d5c3bd8cee7..8d22ba3f8c1860a5b29d1f616a9bf8804ba9c103 100644 (file)
@@ -31,10 +31,10 @@ f (void)
   (struct s) d128; /* { dg-error "conversion to non-scalar type requested" } */
   (union u) d128; /* { dg-error "cast to union type from type not present in union" } */
                
-  (_Decimal32) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (_Decimal32) uv; /* { dg-error "aggregate value used where a float was expected" } */
-  (_Decimal64) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (_Decimal64) uv; /* { dg-error "aggregate value used where a float was expected" } */
-  (_Decimal128) sv; /* { dg-error "aggregate value used where a float was expected" } */
-  (_Decimal128) uv; /* { dg-error "aggregate value used where a float was expected" } */
+  (_Decimal32) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (_Decimal32) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (_Decimal64) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (_Decimal64) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (_Decimal128) sv; /* { dg-error "aggregate value used where a floating point was expected" } */
+  (_Decimal128) uv; /* { dg-error "aggregate value used where a floating point was expected" } */
 }
diff --git a/gcc/testsuite/gcc.dg/gcc_diag-11.c b/gcc/testsuite/gcc.dg/gcc_diag-11.c
new file mode 100644 (file)
index 0000000..c359989
--- /dev/null
@@ -0,0 +1,220 @@
+/* Test warnings for for GCC diagnostics.
+   { dg-do compile }
+   { dg-options "-Wformat -Wformat-diag" } */
+
+/* Magic identifiers must be set before the attribute is used.  */
+
+typedef long long __gcc_host_wide_int__;
+
+typedef struct location_s
+{
+  const char *file;
+  int line;
+} location_t;
+
+union tree_node;
+typedef union tree_node *tree;
+
+/* Define gimple as a dummy type.  The typedef must be provided for
+   the C test to find the symbol.  */
+typedef struct gimple gimple;
+
+/* Likewise for gimple.  */
+typedef struct cgraph_node cgraph_node;
+
+#define FORMAT(kind) __attribute__ ((format (__gcc_## kind ##__, 1, 2)))
+
+/* Basic formatting function like pp_format.  */
+void diag (const char*, ...) FORMAT (diag);
+
+/* Diagnostic formatting function like error or warning declared
+   by the C front end.  */
+void cdiag (const char*, ...) FORMAT (cdiag);
+
+/* Diagnostic formatting function like error or warning declared
+   by the middle-end or back-end.  */
+void tdiag (const char*, ...) FORMAT (tdiag);
+
+/* Diagnostic formatting function like error or warning declared
+   by the C++ front-end.  */
+void cxxdiag (const char*, ...) FORMAT (cxxdiag);
+
+void dump (const char*, ...) FORMAT (dump_printf);
+
+/* Verify that functions declared with the C/C++ front-end __gcc_cdiag__
+   attribute detect invalid whitespace in format strings.  */
+
+void test_cdiag_whitespace (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag (" a");             /* { dg-warning "spurious leading space character in format" } */
+  cdiag ("%< %>a");
+  cdiag ("%<  %>a");
+  cdiag ("a b");
+  cdiag ("a  b");           /* { dg-warning "unquoted sequence of 2 consecutive space characters" } */
+  cdiag ("a ");             /* { dg-warning "spurious trailing space character" } */
+  cdiag ("a  ");            /* { dg-warning "spurious trailing space characters" } */
+  cdiag ("a%< %>");
+  cdiag ("a%< %>%< %>");
+  cdiag ("a%< %> ");        /* { dg-warning "spurious trailing space character" } */
+  cdiag ("a%< %>  %< %>");  /* { dg-warning "unquoted sequence of 2 consecutive space characters" } */
+
+  /* It's debatable whether the following two formst strings should
+     be  cdiagnosed.  They aren't only because it's simpler that way.  */
+  cdiag ("a %< %>");
+  cdiag ("a%< %> %< %>");
+
+  /* Exercise other whitespace characters.  */
+  cdiag ("a\fb");           /* { dg-warning "unquoted whitespace character '\\\\x0c'" } */
+  cdiag ("a\nb");           /* { dg-warning "unquoted whitespace character '\\\\x0a'" } */
+  cdiag ("a\rb");           /* { dg-warning "unquoted whitespace character '\\\\x0d'" } */
+  cdiag ("a\vb");           /* { dg-warning "unquoted whitespace character '\\\\x0b'" } */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-diag"
+
+  /* Verify that the warning can be suppressed.  */
+  cdiag ("\ta\b    c\vb\n");
+
+#pragma GCC diagnostic pop
+}
+
+
+void test_cdiag_control (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("\1");             /* { dg-warning "unquoted control character '\\\\x01'" } */
+  cdiag ("a\ab");           /* { dg-warning "unquoted control character '\\\\x07'" } */
+  cdiag ("a\bb");           /* { dg-warning "unquoted control character '\\\\x08'" } */
+}
+
+
+void test_cdiag_punct (tree t, gimple *gc, int i)
+{
+  (void)&t; (void)&gc;
+
+  /* Exercise the period.  */
+  cdiag (".abc");           /* { dg-warning "spurious leading punctuation character" } */
+  cdiag ("abc;");           /* { dg-warning "spurious trailing punctuation character" } */
+  /* Verify that sentences that start with an uppercase letter and end
+     in a period are not diagnosed.  */
+  cdiag ("This is a full sentence.");
+  cdiag ("Capitalized sentence (with a parethetical note).");
+  cdiag ("Not a full sentence;");   /* { dg-warning "spurious trailing punctuation character" } */
+  cdiag ("Neither is this one,");   /* { dg-warning "spurious trailing punctuation character" } */
+
+  /* Exercise the ellipsis.  */
+  cdiag ("this message...");
+  cdiag ("...continues here");
+  cdiag ("but...not here"); /* { dg-warning "unquoted sequence of 3 consecutive punctuation characters" } */
+
+  /* Exercise parentheses.  */
+  cdiag ("null argument where non-null required (argument %i)", i);
+
+  /* Exercise C++.  */
+  cdiag ("C++ is cool");
+  cdiag ("this is c++");
+  cdiag ("you can do this in C++ but not in C");
+
+  /* Exercise parenthetical note followed by a colon, semicolon,
+     or a comma.  */
+  cdiag ("found a bug (here):");
+  cdiag ("because of another bug (over there); fix it");
+
+  cdiag ("found foo (123): go look at it");
+  cdiag ("missed bar (abc); will try harder next time");
+
+  cdiag ("expected this (or that), got something else (or who knows what)");
+}
+
+
+void test_cdiag_punct_balance (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("f()");            /* { dg-warning "spurious trailing punctuation characters" } */
+  cdiag ("g(1)");
+  cdiag ("(");              /* { dg-warning "spurious leading punctuation character|unbalanced" } */
+  cdiag ("()");             /* { dg-warning "spurious leading punctuation characters" } */
+  cdiag (")");              /* { dg-warning "unbalanced punctuation character '\\\)'" } */
+  cdiag ("f()g");           /* { dg-warning "unquoted sequence of 2 consecutive punctuation characters" } */
+  cdiag ("illegal operand (1)");
+}
+
+
+void test_cdiag_nongraph (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("a\376b");         /* { dg-warning "unquoted non-graph character '\\\\xfe'" } */
+  cdiag ("a\377b");         /* { dg-warning "unquoted non-graph character '\\\\xff'" } */
+}
+
+
+void test_cdiag_attribute (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("attribute foo");
+  cdiag ("this is attribute bar");
+  cdiag ("bad __attribute bar");        /* { dg-warning "unquoted attribute" } */
+  cdiag ("__attribute__ (foobar) bad"); /* { dg-warning "unquoted attribute" } */
+  cdiag ("__attribute__ ((foobar))");   /* { dg-warning "unquoted attribute" } */
+  cdiag ("__attribute__ (xxx))");       /* { dg-warning "unquoted attribute" } */
+  /* { dg-warning "unbalanced punctuation character '\\\)'" "xxx" { target *-*-* } .-1 } */
+  cdiag ("__attribute__ ((yyy)))");     /* { dg-warning "unquoted attribute" } */
+  /* { dg-warning "unbalanced punctuation character '\\\)'" "yyy" { target *-*-* } .-1 } */
+  cdiag ("__attribute__ ((zzz)");       /* { dg-warning "unquoted attribute" } */
+  /* { dg-warning "unbalanced punctuation character '\\\('" "zzz" { target *-*-* } .-1 } */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-diag"
+
+  /* Verify that the warning can be suppressed.  */
+  cdiag ("__attribute__ (((");
+
+#pragma GCC diagnostic pop
+}
+
+void test_cdiag_builtin (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("__builtin_abort");    /* { dg-warning "unquoted name of built-in function '__builtin_abort'" } */
+  cdiag ("in __builtin_trap");  /* { dg-warning "unquoted name of built-in function '__builtin_trap'" } */
+  cdiag ("__builtin_xyz bites");/* { dg-warning "unquoted name of built-in function '__builtin_xyz'" } */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-diag"
+
+  /* Verify that the warning can be suppressed.  */
+  cdiag ("__builtin____with____lots__of__underscores");
+
+#pragma GCC diagnostic pop
+}
+
+void test_cdiag_option (tree t, gimple *gc)
+{
+  (void)&t; (void)&gc;
+
+  cdiag ("%<-Wall%>");
+  cdiag ("use option %<-Wextra%> to enable additinal warnings");
+
+  cdiag ("-O2 is fast");       /* { dg-warning "unquoted option name '-O2'" } */
+  cdiag ("but -O3 is faster"); /* { dg-warning "unquoted option name '-O3'" } */
+
+  cdiag ("get --help");        /* { dg-warning "unquoted option name '--help'" } */
+  cdiag ("enable -m32");       /* { dg-warning "unquoted option name '-m32'" } */
+  cdiag ("value is -12");
+  cdiag ("foo-O2");
+  cdiag ("a-W");
+}
+
+void test_cdiag_oper (tree t, gimple *gc)
+{
+  cdiag ("a == b");            /* { dg-warning "unquoted operator '=='" } */
+  cdiag ("++a");               /* { dg-warning "unquoted operator '\\\+\\\+'" } */
+  cdiag ("b--");               /* { dg-warning "unquoted operator '--'" } */
+}
index 2e561e4b1de8d46e17dfa4a25f05a23709d92217..fed5adf15b7db06de78e88874c28025005bff6c0 100644 (file)
@@ -9,5 +9,5 @@ int a, b, c;
 void
 f (void)
 {
-  c = (++a ? : b); /* { dg-warning "ISO C forbids omitting the middle term of a \\?: expression" } */
+  c = (++a ? : b); /* { dg-warning "ISO C forbids omitting the middle term of a '\\?:' expression" } */
 }
index 90555ad63f5c2dbc1772fce3ace4045368af4d55..08657ff737e580327fc03b954bb1c75c6473533b 100644 (file)
@@ -9,5 +9,5 @@ int a, b, c;
 void
 f (void)
 {
-  c = (++a ? : b); /* { dg-error "ISO C forbids omitting the middle term of a \\?: expression" } */
+  c = (++a ? : b); /* { dg-error "ISO C forbids omitting the middle term of a '\\?:' expression" } */
 }
index 28d198b1ce32cde0fea26067cb26c911914dd3ab..a4ed9a3980afa73a850001c8ccff72d92a3395c9 100644 (file)
@@ -10,9 +10,9 @@ void bar (void);
 void
 foo (void)
 {
-#pragma omp p          /* { dg-warning "-:ignoring #pragma omp _Pragma" } */
+#pragma omp p          /* { dg-warning "-:ignoring '#pragma omp _Pragma'" } */
     bar ();
-  omp_p                        /* { dg-warning "-:ignoring #pragma omp _Pragma" } */
+  omp_p                        /* { dg-warning "-:ignoring '#pragma omp _Pragma'" } */
     bar ();
 }
 
@@ -22,8 +22,8 @@ foo (void)
 void
 baz (void)
 {
-#pragma omp parallel   /* { dg-warning "-:ignoring #pragma omp serial" } */
+#pragma omp parallel   /* { dg-warning "-:ignoring '#pragma omp serial'" } */
     bar ();
-  omp_parallel         /* { dg-warning "-:ignoring #pragma omp serial" } */
+  omp_parallel         /* { dg-warning "-:ignoring '#pragma omp serial'" } */
     bar ();
 }
index a7e8c5a80a22d11e8adcef59a8dab43abff5210e..61734045f2b7c1eae77ac2c6081ccfeb09bcf799 100644 (file)
@@ -16,9 +16,9 @@ void h(a)
 
 char s[1] = "x";
 char s1[1] = { "x" };
-char t[1] = "xy"; /* { dg-warning "initializer-string for array of chars is too long" } */
-char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of chars is too long" } */
-char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
+char t[1] = "xy"; /* { dg-warning "initializer-string for array of 'char' is too long" } */
+char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of 'char' is too long" } */
+char u[1] = { "x", "x" }; /* { dg-error "excess elements in 'char' array initializer" } */
 /* { dg-message "near init" "near" { target *-*-* } .-1 } */
 
 int i = { }; /* { dg-error "empty scalar initializer" } */
index dad57b92baa4fde6c2b4b81dde17b5ca7fef2dcc..4775c4807bb6675c75cdf6b213a05ce2b0c08c52 100644 (file)
@@ -17,9 +17,9 @@ void h(a)
 
 char s[1] = "x";
 char s1[1] = { "x" };
-char t[1] = "xy"; /* { dg-warning "initializer-string for array of chars is too long" } */
-char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of chars is too long" } */
-char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
+char t[1] = "xy"; /* { dg-warning "initializer-string for array of 'char' is too long" } */
+char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of 'char' is too long" } */
+char u[1] = { "x", "x" }; /* { dg-error "excess elements in 'char' array initializer" } */
 /* { dg-message "near init" "near" { target *-*-* } .-1 } */
 
 int j = { 1 };
index d320e0e399fb154b764fac0410a1f857192fa341..c5c338d9a85b3389b5557f82b0fed7a4843af737 100644 (file)
@@ -17,9 +17,9 @@ void h(a)
 
 char s[1] = "x";
 char s1[1] = { "x" };
-char t[1] = "xy"; /* { dg-error "initializer-string for array of chars is too long" } */
-char t1[1] = { "xy" }; /* { dg-error "initializer-string for array of chars is too long" } */
-char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
+char t[1] = "xy"; /* { dg-error "initializer-string for array of 'char' is too long" } */
+char t1[1] = { "xy" }; /* { dg-error "initializer-string for array of 'char' is too long" } */
+char u[1] = { "x", "x" }; /* { dg-error "excess elements in 'char' array initializer" } */
 /* { dg-message "near init" "near" { target *-*-* } .-1 } */
 
 int j = { 1 };
index 75dad1ecb9572ab9a60a70f74555b564ff6a8f7c..058f2e856f5b1a479b30228cf80ba29fcba415e5 100644 (file)
@@ -1,4 +1,4 @@
-/* Test diagnostics for parameter mismatches.  Types that can't match
+/* Test diagnostics for parameter mismatches.  Types that cannot match
    ().  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
@@ -6,13 +6,13 @@
 
 void f0(); /* { dg-message "note: previous declaration of 'f0' was here" } */
 void f0(int, ...); /* { dg-error "conflicting types for 'f0'" } */
-/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
+/* { dg-message "note: a parameter list with an ellipsis cannot match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
 void f1(int, ...); /* { dg-message "note: previous declaration of 'f1' was here" } */
 void f1(); /* { dg-error "conflicting types for 'f1'" } */
-/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
+/* { dg-message "note: a parameter list with an ellipsis cannot match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
 void f2(); /* { dg-message "note: previous declaration of 'f2' was here" } */
 void f2(char); /* { dg-error "conflicting types for 'f2'" } */
-/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
+/* { dg-message "note: an argument type that has a default promotion cannot match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
 void f3(char); /* { dg-message "note: previous declaration of 'f3' was here" } */
 void f3(); /* { dg-error "conflicting types for 'f3'" } */
-/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
+/* { dg-message "note: an argument type that has a default promotion cannot match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
index c9bb238e96ba84bfbc9740e406c6109ef6251616..d63238eab0714044a29367cce7b92739a5ea660d 100644 (file)
@@ -7,16 +7,16 @@ void
 foo (int *x, int y)
 {
   int constant = 0;
-  asm ("# %0" :: "i" (x)); /* { dg-warning "probably doesn't match" } */
+  asm ("# %0" :: "i" (x)); /* { dg-warning "probably does not match" } */
   /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
 
-  asm ("# %0" :: "i" (bar (*x))); /* { dg-warning "probably doesn't match" } */
+  asm ("# %0" :: "i" (bar (*x))); /* { dg-warning "probably does not match" } */
   /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
 
-  asm ("# %0" :: "i" (*x + 0x11)); /* { dg-warning "probably doesn't match" } */
+  asm ("# %0" :: "i" (*x + 0x11)); /* { dg-warning "probably does not match" } */
   /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
 
-  asm ("# %0" :: "i" (constant)); /* { dg-warning "probably doesn't match" } */
+  asm ("# %0" :: "i" (constant)); /* { dg-warning "probably does not match" } */
   /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
 
   asm ("# %0" :: "i" (y * 0)); /* folded */
index 6626a58ea48b4afbf740150214e44288b9d4c53a..70d3483d80cd869ee74bf3c54df71d6554d2ca18 100644 (file)
@@ -15,7 +15,7 @@ f2 (void *x)
 {
   __asm volatile ("" : "=r" (*x));     /* { dg-warning "dereferencing" "deref" } */
 }                                      /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
-                                       /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
+                                       /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
 void
 f3 (void *x)
 {
@@ -39,7 +39,7 @@ f6 (void *x)
 {
   __asm volatile ("" : "=g" (*x));     /* { dg-warning "dereferencing" "deref" } */
 }                                      /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
-                                       /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
+                                       /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
 void
 f7 (struct S *x)
 {
@@ -49,5 +49,5 @@ f7 (struct S *x)
 void
 f8 (struct S *x)
 {
-  __asm volatile ("" : "=r" (*x));     /* { dg-error "invalid lvalue in asm output 0" } */
+  __asm volatile ("" : "=r" (*x));     /* { dg-error "invalid lvalue in 'asm' output 0" } */
 }
index c3aca89645c33280df5a5f39df2ed7ba68190a9f..ce6bece3f964398935a753ab4614ff6b1893347b 100644 (file)
@@ -15,7 +15,7 @@ f2 (void *x)
 {
   __asm ("" : "=r" (*x));      /* { dg-warning "dereferencing" "deref" } */
 }                              /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
-                               /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
+                               /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
 void
 f3 (void *x)
 {
@@ -39,7 +39,7 @@ f6 (void *x)
 {
   __asm ("" : "=g" (*x));      /* { dg-warning "dereferencing" "deref" } */
 }                              /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
-                               /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
+                               /* { dg-error "invalid lvalue in 'asm' output 0" "invalid lvalue" { target *-*-* } .-2 } */
 void
 f7 (struct S *x)
 {
@@ -49,5 +49,5 @@ f7 (struct S *x)
 void
 f8 (struct S *x)
 {
-  __asm ("" : "=r" (*x));      /* { dg-error "invalid lvalue in asm output 0" } */
+  __asm ("" : "=r" (*x));      /* { dg-error "invalid lvalue in 'asm' output 0" } */
 }
index b3dd0de9ea68e38c0a9667c382fdca62de9d64c4..9b01b22631cdb999130093e014ff0f19beaa713c 100644 (file)
@@ -17,13 +17,13 @@ fn2 (unsigned int p)
 _Bool
 fn3 (unsigned int p)
 {
-  return p >= 0U; /* { dg-warning "12:comparison of unsigned expression >= 0 is always true" } */
+  return p >= 0U; /* { dg-warning "12:comparison of unsigned expression in '>= 0' is always true" } */
 }
 
 _Bool
 fn4 (unsigned int p)
 {
-  return p < 0U; /* { dg-warning "12:comparison of unsigned expression < 0 is always false" } */
+  return p < 0U; /* { dg-warning "12:comparison of unsigned expression in '< 0' is always false" } */
 }
 
 _Bool
index 111585dd0252fbabd61ef79ccc589d87887edcca..e707904c0876b5370422229810636e210f027228 100644 (file)
@@ -47,7 +47,7 @@ __extension__ int a15[10] = {[2 ... 1] = 4 }; /* { dg-error "31:empty index rang
 __extension__ int a16[10] = {[2 ... 100] = 4 }; /* { dg-error "31:array index range in initializer exceeds array bounds" } */
 int a17[] = { .B = 1 }; /* { dg-error "15:field name not in record or union initializer" } */
 int a18[] = { e }; /* { dg-error "15:initializer element is not constant" } */
-char a19[1] = { "x", "x" }; /* { dg-error "22:excess elements in char array initializer" } */
+char a19[1] = { "x", "x" }; /* { dg-error "22:excess elements in 'char' array initializer" } */
 
 void
 bar (void)
index b05f533dc0f42a3f61978f7c94fcd84dce177987..2281a02f17a2b0e32158923e33883dd5835291eb 100644 (file)
@@ -12,7 +12,7 @@ typedef struct {
 
 void switch_to_stack (my_stack *stack){
     asm (  /* { dg-error "impossible constraint" } */
-/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } .-1 } */
+/* { dg-warning "'asm' operand 1" "asm operand 1" { target *-*-* } .-1 } */
         "\n"
         : "+r" (stack->regs)
     );
index bb8293fb63370f2621c4a9341841346a769ab792..663a171821b0bbfad56df6308f5b5a8a9b967156 100644 (file)
@@ -9,5 +9,5 @@ foo (int a)
 {
   if (__builtin_setjmp (buf) == 0)
     __asm__ ("" : : "n" (a * 2));      /* { dg-error "impossible constraint in 'asm'" } */
-                                       /* { dg-warning "asm operand 0 probably doesn't match constraints" "" { target *-*-* } .-1 } */
+                                       /* { dg-warning "'asm' operand 0 probably does not match constraints" "" { target *-*-* } .-1 } */
 }
index d77f2bb1af2222f74c369bc232e97b02e2798008..601724834affeb4e4a872876b60fc39b44ae8195 100644 (file)
@@ -45,7 +45,7 @@ hanneke ()
   foo = (typeof (foo)) foo2;
 
   /* Casted assignment between scalar and SIMD of different size.  */
-  foo1 = (typeof (foo1)) foo2; /* { dg-error "can't convert a vector of type" } */
+  foo1 = (typeof (foo1)) foo2; /* { dg-error "cannot convert a vector of type" } */
 
   /* Operators on compatible SIMD types.  */
   a += b + b;
index 13e1caba6cb1c8e9ad0815ea50d95e7c81f8adde..e5462390effb4d7a5a42e83e0dd4ce1c8dc00bf3 100644 (file)
@@ -33,10 +33,10 @@ hanneke ()
   foo = a; /* { dg-error "incompatible types when assigning" } */
 
   /* Casted assignment between scalar and SIMD of same size.  */
-  foo = (typeof (foo)) foo2; /* { dg-error "aggregate value used where a float was expected" } */
+  foo = (typeof (foo)) foo2; /* { dg-error "aggregate value used where a floating point was expected" } */
 
   /* Casted assignment between scalar and SIMD of different size.  */
-  foo1 = (typeof (foo1)) foo2; /* { dg-error "aggregate value used where a float was expected" } */
+  foo1 = (typeof (foo1)) foo2; /* { dg-error "aggregate value used where a floating point was expected" } */
 
   /* Operators on compatible SIMD types.  */
   a += b + b;
index 27e293ffa60e583d4b08b1256639adb399902e0c..8187de43481f9a3122d5cd8eb4103ed9f1127569 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
 /* { dg-options "--param does-not-resemble-anything=42" } */
-/* { dg-error "invalid --param name .does-not-resemble-anything."  "" { target *-*-* } 0 } */
+/* { dg-error "invalid '--param' name 'does-not-resemble-anything'"  "" { target *-*-* } 0 } */
 
index 1bb7bca6024514debf12361f14b8d3e1637c675c..01e1343ab9e143304b198122a75e8ad0546584d7 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
 /* { dg-options "--param max-early-inliner-iteration=3" } */
-/* { dg-error "invalid --param name .max-early-inliner-iteration.; did you mean .max-early-inliner-iterations.?"  "" { target *-*-* } 0 } */
+/* { dg-error "invalid '--param' name 'max-early-inliner-iteration'; did you mean 'max-early-inliner-iterations'?"  "" { target *-*-* } 0 } */
 
index 2e6ccd32f19e6f03aeb93bc9ca0509195016797a..f901fd14b54bf953a39ab3e29ba7a2150e37c63a 100644 (file)
@@ -11,8 +11,8 @@ const char a3[3] = "12\0";
 const char a8[8] = "1234567\0";
 const char a9[9] = "12345678\0";
 
-const char ax[9] = "12345678\0\0\0\0";   /* { dg-warning "initializer-string for array of chars is too long" } */
-const char ay[9] = "\00012345678\0\0\0\0";   /* { dg-warning "initializer-string for array of chars is too long" } */
+const char ax[9] = "12345678\0\0\0\0";   /* { dg-warning "initializer-string for array of 'char' is too long" } */
+const char ay[9] = "\00012345678\0\0\0\0";   /* { dg-warning "initializer-string for array of 'char' is too long" } */
 
 
 int len1 (void)
index 0dabf76ce6dac69107021903f8277a6e301be631..dbaab307a1e309aec7e8325b941382bb62a7608e 100644 (file)
@@ -4,7 +4,7 @@
 __attribute__((always_inline))
 static void asmfunc(void)
 {
-  __asm__ (""); /* { dg-error "asm not allowed in .transaction_safe" } */
+  __asm__ (""); /* { dg-error "'asm' not allowed in 'transaction_safe" } */
 }
 
 __attribute__((transaction_safe))
index 8a1227d30d661dcd8fc59b4ea76e10c212a500f5..5501b546fe0bbbd39abe681f996bb17967e5745e 100644 (file)
@@ -6,7 +6,7 @@ int
 foo (int x)
 {
   asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */
-  /* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } .-1 } */
+  /* { dg-warning "probably does not match constraints" "" { target *-*-* } .-1 } */
   return 1;
 lab:
   return 0;
index aa76a71c58d0b64465b0bada1b56911757c9cd36..2dbb832b7cc5202e325c96cf98e3a378b3b05d25 100644 (file)
@@ -7,7 +7,7 @@ int
 bar (int x)
 {
   asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */
-/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } .-1 } */
+/* { dg-warning "probably does not match constraints" "" { target *-*-* } .-1 } */
   __builtin_unreachable ();
 lab:
   return 0;
index a582e71178c84278e01c65487b548bec52010e9b..81b452a33a1cffcdb04c539986d736be04063f6e 100644 (file)
@@ -21,8 +21,8 @@ const char16_t        s16_2[] = U"ab";        /* { dg-error "from a string literal with type a
 const char16_t s16_3[] = L"ab";
 const char16_t s16_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char16_t s16_5[0] = u"ab";       /* { dg-warning "chars is too long" } */
-const char16_t s16_6[1] = u"ab";       /* { dg-warning "chars is too long" } */
+const char16_t s16_5[0] = u"ab";       /* { dg-warning " is too long" } */
+const char16_t s16_6[1] = u"ab";       /* { dg-warning " is too long" } */
 const char16_t s16_7[2] = u"ab";
 const char16_t s16_8[3] = u"ab";
 const char16_t s16_9[4] = u"ab";
@@ -33,11 +33,11 @@ const char32_t      s32_2[] = U"ab";
 const char32_t s32_3[] = L"ab";        /* { dg-error "from a string literal with type array of" } */
 const char32_t s32_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char32_t s32_5[0] = U"ab";       /* { dg-warning "chars is too long" } */
-const char32_t s32_6[1] = U"ab";       /* { dg-warning "chars is too long" } */
-const char32_t s32_7[2] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
-const char32_t s32_8[3] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
-const char32_t s32_9[4] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_5[0] = U"ab";       /* { dg-warning " is too long" } */
+const char32_t s32_6[1] = U"ab";       /* { dg-warning " is too long" } */
+const char32_t s32_7[2] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_8[3] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_9[4] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
 
 const wchar_t  sw_0[]  = "ab";         /* { dg-error "from a string literal with type array of .char." } */
 const wchar_t  sw_1[]  = u"ab";
index 8687989a0613010bf8459ff2ffbe3d290aacea5e..7f0cb915e041a3a42629f960871bcb3d140ed6c4 100644 (file)
@@ -21,8 +21,8 @@ const char16_t        s16_2[] = U"ab";        /* { dg-error "from a string literal with type a
 const char16_t s16_3[] = L"ab";        /* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char16_t_compatible } } } */
 const char16_t s16_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char16_t s16_5[0] = u"ab";       /* { dg-warning "chars is too long" } */
-const char16_t s16_6[1] = u"ab";       /* { dg-warning "chars is too long" } */
+const char16_t s16_5[0] = u"ab";       /* { dg-warning " is too long" } */
+const char16_t s16_6[1] = u"ab";       /* { dg-warning " is too long" } */
 const char16_t s16_7[2] = u"ab";
 const char16_t s16_8[3] = u"ab";
 const char16_t s16_9[4] = u"ab";
@@ -33,11 +33,11 @@ const char32_t      s32_2[] = U"ab";
 const char32_t s32_3[] = L"ab";        /* { dg-error "from a string literal with type array of .(long |short )?(unsigned )?int." "" { target { ! wchar_t_char32_t_compatible } } } */
 const char32_t s32_4[] = u8"ab";       /* { dg-error "from a string literal with type array of .char." } */
 
-const char32_t s32_5[0] = U"ab";       /* { dg-warning "chars is too long" } */
-const char32_t s32_6[1] = U"ab";       /* { dg-warning "chars is too long" } */
-const char32_t s32_7[2] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
-const char32_t s32_8[3] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
-const char32_t s32_9[4] = U"ab";       /* { dg-warning "chars is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_5[0] = U"ab";       /* { dg-warning " is too long" } */
+const char32_t s32_6[1] = U"ab";       /* { dg-warning " is too long" } */
+const char32_t s32_7[2] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_8[3] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
+const char32_t s32_9[4] = U"ab";       /* { dg-warning " is too long" "" { target "m32c-*-*" } } */
 
 const wchar_t  sw_0[]  = "ab";         /* { dg-error "from a string literal with type array of .char." } */
 const wchar_t  sw_1[]  = u"ab";        /* { dg-error "from a string literal with type array of" "" { target { ! wchar_t_char16_t_compatible } } } */
index d96b15dccb76303afce191707404acb6bdea782b..b3b873dfd8ae15cb19e4723db84380639b2cecce 100644 (file)
@@ -12,16 +12,16 @@ const char16_t      s1[]    = u8"ab";       /* { dg-error "from a string literal with type arr
 const char32_t  s2[]    = u8"ab";      /* { dg-error "from a string literal with type array of .char." } */
 const wchar_t   s3[]    = u8"ab";      /* { dg-error "from a string literal with type array of .char." } */
 
-const char      t0[0]   = u8"ab";      /* { dg-warning "chars is too long" } */
-const char      t1[1]   = u8"ab";      /* { dg-warning "chars is too long" } */
+const char      t0[0]   = u8"ab";      /* { dg-warning " is too long" } */
+const char      t1[1]   = u8"ab";      /* { dg-warning " is too long" } */
 const char      t2[2]   = u8"ab";
 const char      t3[3]   = u8"ab";
 const char      t4[4]   = u8"ab";
 
-const char      u0[0]   = u8"\u2160."; /* { dg-warning "chars is too long" } */
-const char      u1[1]   = u8"\u2160."; /* { dg-warning "chars is too long" } */
-const char      u2[2]   = u8"\u2160."; /* { dg-warning "chars is too long" } */
-const char      u3[3]   = u8"\u2160."; /* { dg-warning "chars is too long" } */
+const char      u0[0]   = u8"\u2160."; /* { dg-warning " is too long" } */
+const char      u1[1]   = u8"\u2160."; /* { dg-warning " is too long" } */
+const char      u2[2]   = u8"\u2160."; /* { dg-warning " is too long" } */
+const char      u3[3]   = u8"\u2160."; /* { dg-warning " is too long" } */
 const char      u4[4]   = u8"\u2160.";
 const char      u5[5]   = u8"\u2160.";
 const char      u6[6]   = u8"\u2160.";
index b331bb5aaff433c929ab420fead30ec440617f29..a38679fa8883f197543d0dd6ebabd8f0f3ee1b6b 100644 (file)
@@ -26,7 +26,7 @@ void sink (int, ...);
 const char a[5] = "12345";    /* { dg-message "declared here" } */
 const char b[6] = "123456";   /* { dg-message "declared here" } */
 const char a2[][3] = {
-  "", "1", "12", "123", "123\000"   /* { dg-warning "initializer-string for array of chars is too long" } */
+  "", "1", "12", "123", "123\000"   /* { dg-warning "initializer-string for array of 'char' is too long" } */
 };
 
 
index b0c05239b013ba3a10d6b2612ec106d731f4f2ec..e7bd1a585f941e5cf8c435a1617ae422b3897d59 100644 (file)
@@ -11,5 +11,5 @@ void a(void)
 void b(void)
 {
   char x;
-  asm("" : "=@ccbad"(x)); /* { dg-error "unknown asm flag output" } */
+  asm("" : "=@ccbad"(x)); /* { dg-error "unknown 'asm' flag output" } */
 }
index 18e506631ebffde0e8b85f7a157f4931c45417fe..57e60fbadef8373ab5bdd564922ca4c3d7b0b8ba 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-O0 -mno-popcnt" } */
 
 inline int __attribute__ ((__gnu_inline__, __always_inline__, target("popcnt")))
-foo () /* { dg-error "inlining failed in call to always_inline .* target specific option mismatch" } */
+foo () /* { dg-error "inlining failed in call to 'always_inline' .* target specific option mismatch" } */
 {
   return 0;
 }
index bcbcc97c641366f84fa2a3fadf0ed0b5d0ecd5cd..138b98fe1ea7a131963284e044a610557800db0f 100644 (file)
@@ -31,7 +31,7 @@ fn4 (uword_t error_code, void *frame)
   error = error_code;
 }
 
-extern int fn5 (void *) __attribute__ ((interrupt)); /* { dg-error "interrupt service routine can't have non-void return value" } */
+extern int fn5 (void *) __attribute__ ((interrupt)); /* { dg-error "interrupt service routine must return 'void'" } */
 
 int
 fn5 (void *frame)
index 506f61afa853c6a2c527d27c3163f8626fcad3d7..3e2f6a0eb41aa85ab18dc0ea82606488be9fc6b8 100644 (file)
@@ -8,5 +8,5 @@ extern void fn (void *) __attribute__((interrupt));
 void
 foo (void)
 {
-  fn (&error); /* { dg-error "interrupt service routine can't be called directly" } */
+  fn (&error); /* { dg-error "interrupt service routine cannot be called directly" } */
 }
index 2a92851516c60846057188a37fc8b9d99761af00..9c4e22ac716bf71f4a33e6164eb692e5999af820 100644 (file)
@@ -2,5 +2,5 @@
 
 void foo(double d)
 {
-  __asm__ ("" : "=u" (d));  /* { dg-error "output regs" } */
+  __asm__ ("" : "=u" (d));  /* { dg-error "output registers" } */
 }
index 2af2264c3cc6b8298e14180b3b4f37b4bd575cb7..85b5671e920585e6b33afb96262c2a633e14107c 100644 (file)
@@ -13,7 +13,7 @@ extern int bar1 (union un);
 extern union un bar2 (int);
 
 int
-foo1 (union un u) /* { dg-message "note: the ABI of passing union with long double has changed in GCC 4.4" } */
+foo1 (union un u) /* { dg-message "note: the ABI of passing union with 'long double' has changed in GCC 4.4" } */
 {
   bar1 (u);
   return u.i;
index 0548466d6deadd16953ea9e91daaff20ada9621e..c94c002f14b1ff8634a99e06f61b2f02d6170ef9 100644 (file)
@@ -10,7 +10,7 @@ struct X {
 
 struct X
 foo (float *p)
-{ /* { dg-message "note: the ABI of passing structure with complex float member has changed in GCC 4.4" } */
+{ /* { dg-message "note: the ABI of passing structure with 'complex float' member has changed in GCC 4.4" } */
   struct X x;
   x.c = -3;
   __real x.val = p[0];
index 25c565c879a2cf4305faa04853d001f08890d597..9a78f62c98cacf2ccaf765047491131d1dee9a73 100644 (file)
@@ -3,7 +3,7 @@
 
 /* callee cannot be inlined into caller because it has a higher target ISA.  */
 __attribute__((always_inline,target("sse4.2")))
-__inline int callee () /* { dg-error "inlining failed in call to always_inline" }  */
+__inline int callee () /* { dg-error "inlining failed in call to 'always_inline'" }  */
 {
   return 0;
 }
index da0676aa69bf3ebc1f2b3ca901a4f57e3eacf893..6198ea9af05198cbf9c7908601759f2034dbfa74 100644 (file)
@@ -5,7 +5,7 @@ double
 test ()
 {
   double x = 1.0;
-  asm ("fld %1" /* { dg-error "explicitly used regs must be grouped at top of stack" } */
+  asm ("fld %1" /* { dg-error "explicitly used registers must be grouped at top of stack" } */
        : "=&t" (x)
        : "u" (x));
   return x;
index 10adb44667afa1e154eab61bcdd24b27de6e6db9..08d1a3ea1f1c82eea6fae30d405866b00d7fe5a5 100644 (file)
@@ -7,4 +7,4 @@ void foo (void)
   register int r19 asm ("19");
 
   asm volatile ("# %0" : "=r"(r19));  /* { dg-error "invalid use of register" } */
-}  /* { dg-error "cannot be used in asm here" } */
+}  /* { dg-error "cannot be used in 'asm' here" } */
index 50eb5a3bcfc571a618be3b2a866df65189dc92c4..161ec88e3a7d05a6eb06b318eda5b778241e503d 100644 (file)
@@ -9,4 +9,4 @@ void
 bar (void) /* { dg-error "frame pointer required, but reserved" } */
 {
   B = &y;
-} /* { dg-error "bp cannot be used in asm here" } */
+} /* { dg-error "bp cannot be used in 'asm' here" } */
index b0ba51360dab7364066f9a88de05fc08852650ce..9eae4696ff0b5cd896dd8f3735612e17588bf6af 100644 (file)
@@ -1,5 +1,5 @@
 -- { dg-do compile }
--- { dg-error "not marked Inline_Always" "" { target *-*-* } 0 }
+-- { dg-error "not marked 'Inline_Always'" "" { target *-*-* } 0 }
 -- { dg-error "cannot be inlined" "" { target *-*-* } 0 }
 
 with Inline3_Pkg; use Inline3_Pkg;
index 45803fabf7732ea4680e353937d75902c5fac4eb..5d9bed7e6f833ba7bfb54ee602c25f4b3d752740 100644 (file)
@@ -1,6 +1,6 @@
 -- { dg-do compile }
 -- { dg-options "-O -gnatn -Winline" }
--- { dg-warning "not marked Inline" "" { target *-*-* } 0 }
+-- { dg-warning "not marked 'Inline'" "" { target *-*-* } 0 }
 -- { dg-warning "cannot be inlined" "" { target *-*-* } 0 }
 
 with Inline5_Pkg; use Inline5_Pkg;
index 2c2a46a22fd3fee3a0c424d7926b0a7557e76308..390d627b2f5d8972aba36914f9272d308fc2d2a4 100644 (file)
@@ -1,6 +1,6 @@
 -- { dg-do compile }
 -- { dg-options "-O -gnatn -Winline" }
--- { dg-warning "not marked Inline" "" { target *-*-* } 0 }
+-- { dg-warning "not marked 'Inline'" "" { target *-*-* } 0 }
 -- { dg-warning "cannot be inlined" "" { target *-*-* } 0 }
 
 with Inline7_Pkg1; use Inline7_Pkg1;
index d64e134acf3fa2cd91f393b2cdb04edd4856c778..3ab23c6e47d67628c6c96e89bb4bc6cfb29b429b 100644 (file)
@@ -1,6 +1,6 @@
 -- { dg-do compile }
 -- { dg-options "-O -gnatn -Winline" }
--- { dg-warning "not marked Inline" "" { target *-*-* } 0 }
+-- { dg-warning "not marked 'Inline'" "" { target *-*-* } 0 }
 -- { dg-warning "cannot be inlined" "" { target *-*-* } 0 }
 
 with Inline9_Pkg; use Inline9_Pkg;
index f0eab03eff99a967420a2e6838159126c4c68c5b..78957cb061edf44d1b5ea576cd9372996743722f 100644 (file)
@@ -436,6 +436,4 @@ int main ()
   return(0);
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 90a657c8d7046fcb3c2dfa2872c75e26b38b0bf7..622e4ca3b60aa7f7ea2e7d587782ebe110279251 100644 (file)
@@ -27,19 +27,19 @@ int test (id object)
   int dummy = 0;
 
   @try { @throw object; }
-  @catch (int x)          /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int x)          /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (intTypedef x)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (intTypedef x)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (int *x)         /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int *x)         /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }  
@@ -51,7 +51,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (id <MyProtocol> x) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -63,13 +63,13 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObject <MyProtocol> *x)  /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObject <MyProtocol> *x)  /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (MyObject x)     /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (MyObject x)     /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {                     /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
       dummy++;            /* { dg-message "MyObject" "" { target *-*-* } interface_MyObject } */
     }                     /* { dg-message "candidate" "" { target *-*-* } interface_MyObject } */
@@ -86,7 +86,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -98,7 +98,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (Class x)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (Class x)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
index ccdeb34a01586e046c1eaed44ef8f703c6cb68c3..4aa00a6006fbb50fc072791352b90c42b0ecc143 100644 (file)
@@ -33,18 +33,18 @@ int test (id object)
   @try { @throw object; }
   @catch
     {          /* { dg-error "expected" } */
-      dummy++; /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
+      dummy++; /* { dg-error "'@catch' parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
     }
   @catch ()  /* { dg-error "expected identifier before" } */
-    {        /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
+    {        /* { dg-error "'@catch' parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
       dummy++;
     }
   @catch (i) /* { dg-error ".i. has not been declared" } */
-    {        /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
+    {        /* { dg-error "'@catch' parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
       dummy++;
     }
   @catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
-    {                       /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
+    {                       /* { dg-error "'@catch' parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
       dummy++;
     }
   @catch MyObject *x       /* { dg-error "expected ... before .MyObject." } */
index 01bf10843b7d6e2f98e34f8dde7f0fc2de19615f..5aa08f35821eeb05f0170df64fc9273aa35a767f 100644 (file)
@@ -27,19 +27,19 @@ int test (id object)
   int dummy = 0;
 
   @try { @throw object; }
-  @catch (int)          /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int)          /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (intTypedef)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (intTypedef)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (int *)         /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int *)         /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }  
@@ -51,7 +51,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (id <MyProtocol>) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -63,13 +63,13 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObject <MyProtocol> *)  /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObject <MyProtocol> *)  /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (MyObject)     /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (MyObject)     /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {                     /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
       dummy++;            /* { dg-message "MyObject" "" { target *-*-* } interface_MyObject } */
     }                     /* { dg-message "candidate" "" { target *-*-* } interface_MyObject } */
@@ -87,7 +87,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -99,7 +99,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (Class)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (Class)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
index 6f6ba783ea75b02203a233ae878b03e1e3f61b39..7a776a518a2d89b9e31079e72ce77fc9a1f317f8 100644 (file)
@@ -9,7 +9,7 @@
 void test (id object)
 {
   @throw object;   /* Ok */
-  @throw;          /* { dg-error ".@throw. .rethrow. used outside of a @catch block" } */
+  @throw;          /* { dg-error ".@throw. .rethrow. used outside of a '@catch' block" } */
   @throw (object); /* Ok.  */
   @throw (id)0     /* { dg-error "expected" } */
 }
index 2282dec5b151509692c3b2c24c4ed21d1323a63c..4546144517875f253d450122d63d524830b6e65c 100644 (file)
@@ -24,9 +24,7 @@ void foo(void) {
        /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } Derived_port_last } */
 
   [receiver starboard];  /* { dg-warning "no .\\+starboard. method found" } */
-       /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
-       /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
-       /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
+       /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
 
   [Class port];  /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
 }
index b0a1f59111740ddf2ef579ddfb726f991e768a03..cd53d0f2f165dce2ef6fd025ce76f58d76086fc0 100644 (file)
@@ -16,10 +16,9 @@ id foo(void) {
   TestsuiteObject *obj = [[TestsuiteObject alloc] init];
   id obj2 = obj;
   [obj setWindow:nil];  /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
-       /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
-       /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
-       /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
-  [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
+       /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
+
+[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
        /* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } Class1_setWindow } */
        /* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } Class2_setWindow } */
 
index 8f60511f788589a2da7491fb6ae7691ff709657f..65c0043e2e25458c7c1c8229c4ac649032438c88 100644 (file)
@@ -8,11 +8,9 @@
 @class NotKnown;
 
 void foo(NotKnown *n) {
-  [NotKnown new];         /* { dg-warning ".interface of class .NotKnown. not found" } */
-  [n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [NotKnown new];         /* { dg-warning "'.interface' of class .NotKnown. not found" } */
+  [n nonexistent_method]; /* { dg-warning "'.interface' of class .NotKnown. not found" } */
                           /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 89409143e14a75434b2efa97a5599e66723cfe49..277a7e9e223e050357be0a29315e0d9839a745c4 100644 (file)
@@ -11,12 +11,10 @@ void foo(UnderSpecified *u, NotAClass *n) {
   [n nonexistent_method];    /* { dg-warning "invalid receiver type" } */
        /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
   [NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
-  [u nonexistent_method];    /* { dg-warning ".interface of class .UnderSpecified. not found" } */
+  [u nonexistent_method];    /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
                              /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
-  [UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
+  [UnderSpecified nonexistent_method]; /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
                                        /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } .-1 } */
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 4509c4aa477e6e807b92698e85ea9a8bef5fab4a..787e25d67ffd3f5c21d1fd2778546175dc3b99b7 100644 (file)
@@ -27,7 +27,4 @@
 }
 @end
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
-
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 47499c37c0836e7389e74e5f1b685c9eccfa8281..e458471ff2ce25bd473add5a67c1301ce07bd50d 100644 (file)
@@ -39,7 +39,7 @@ void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a,
 
   /* If a class is specified by name, the @interface must be available
      to check what it responds to.  */
-  [NotKnown classMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [NotKnown classMethod]; /* { dg-warning "'.interface' of class .NotKnown. not found" } */
 
 
   /* "id w" means that "w" responds to anything, both class and
@@ -70,7 +70,7 @@ void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a,
      because they expect the compiler to do type-checking; the
      @interface must be available to do this check, otherwise the
      compiler does not know what "a" responds to.  */
-  [a instanceMethod];  /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [a instanceMethod];  /* { dg-warning "'.interface' of class .NotKnown. not found" } */
 
   /* But, if you cast it to "id", then you're disabling type-checking
      and the warnings should go away.  */
index 2b9945fc16c95846443a98c2f764ba00ac8fa066..2e753d1f8ba1baeefdbb4f0ab975065983db7666 100644 (file)
@@ -47,6 +47,4 @@ long foo(void) {
   return receiver;
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 9fb09b5f2bb9b33b06275f747cbba9bdc3f99c1c..aa3082c9ded715d3fb4b062e9d623b3c818b402c 100644 (file)
@@ -25,7 +25,6 @@ void test1 (void)
 {
   [object1 method]; /* Ok */
   [object2 method]; /* { dg-warning ".MyClass. may not respond to ..method." } */
-                    /* { dg-warning "without a matching method" "" { target *-*-* } .-1 } */
-                    /* { dg-warning "will be assumed to return" "" { target *-*-* } .-2 } */
-                    /* { dg-warning "as arguments" "" { target *-*-* } .-3 } */
+
+  /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept '\.\.\.' as arguments" "" { target *-*-* } 0 } */
 }
index af01d4453644e97dbef54f81a74a36b2e11a0368..0a3765f07fbcb3e54f261b5a33e464fa778abbc6 100644 (file)
 }
 @end
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 086201eef521525eaf8d4f16991c2558fd3fba45..59c8f827615931211eabd5944bc63c6cbf39987b 100644 (file)
@@ -436,6 +436,4 @@ int main ()
   return(0);
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 24fe7094eae74edadcc60af6b4a3b7dd8c24deef..e5d5a595e91c2a4081c3e86b987041e5c6affb58 100644 (file)
@@ -44,8 +44,4 @@ int main(void) {
   return 0;
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
-
-
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 5548a39a08c10255b95a425fdd265c506ee76f24..69a6494e0482f2befe75c3c16f031ae5649cc941 100644 (file)
@@ -27,19 +27,19 @@ int test (id object)
   int dummy = 0;
 
   @try { @throw object; }
-  @catch (int x)          /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int x)          /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (intTypedef x)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (intTypedef x)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (int *x)         /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int *x)         /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }  
@@ -51,7 +51,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (id <MyProtocol> x) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -63,13 +63,13 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObject <MyProtocol> *x)  /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObject <MyProtocol> *x)  /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (MyObject x)     /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (MyObject x)     /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {                     /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } .-1 } */
       dummy++;
     }
@@ -87,7 +87,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -99,7 +99,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (Class x)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (Class x)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
index 5db60e34aca97cf44d7ff383d123036559bf26da..bbdb741f40b55c9c68e721e4c3afeb9b94a4edb3 100644 (file)
@@ -44,7 +44,7 @@ int test (id object)
       dummy++;
     }
   @catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
-    {                       /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
+    {                       /* { dg-error "'@catch' parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
       dummy++;
     }
   @catch MyObject *x       /* { dg-error "expected ... before .MyObject." } */
index 402aa114ade4eaf0e61eb112f41d94dc80ab4250..55ef0f340e69ad0b37dda495c2e0cf8bad59a703 100644 (file)
@@ -27,19 +27,19 @@ int test (id object)
   int dummy = 0;
 
   @try { @throw object; }
-  @catch (int)          /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int)          /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (intTypedef)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (intTypedef)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (int *)         /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (int *)         /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }  
@@ -51,7 +51,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (id <MyProtocol>) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -63,13 +63,13 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObject <MyProtocol> *)  /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObject <MyProtocol> *)  /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
 
   @try { @throw object; }
-  @catch (MyObject)     /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (MyObject)     /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {                     /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } .-1 } */
       dummy++;
     }
@@ -87,7 +87,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
+  @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "'@catch' parameter cannot be protocol-qualified" } */
     {
       dummy++;
     }
@@ -99,7 +99,7 @@ int test (id object)
     }
 
   @try { @throw object; }
-  @catch (Class)   /* { dg-error "@catch parameter is not a known Objective-C class type" } */
+  @catch (Class)   /* { dg-error "'@catch' parameter is not a known Objective-C class type" } */
     {
       dummy++;
     }
index 74be98d39fa0ec6954ad0d5c7180cf2fdfa310c4..ae44a88e4360be3959abb5d56c44bd141214b4b7 100644 (file)
@@ -9,7 +9,7 @@
 void test (id object)
 {
   @throw object;   /* Ok */
-  @throw;          /* { dg-error ".@throw. .rethrow. used outside of a @catch block" } */
+  @throw;          /* { dg-error ".@throw. .rethrow. used outside of a '@catch' block" } */
   @throw (object); /* Ok.  */
   @throw (id)0     /* { dg-error "expected" } */
 }
index 8f60511f788589a2da7491fb6ae7691ff709657f..83280fb89f621c00d310c2c4e5db0c6b32296f86 100644 (file)
@@ -8,11 +8,9 @@
 @class NotKnown;
 
 void foo(NotKnown *n) {
-  [NotKnown new];         /* { dg-warning ".interface of class .NotKnown. not found" } */
-  [n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [NotKnown new];         /* { dg-warning "'.interface' of class .NotKnown. not found" } */
+  [n nonexistent_method]; /* { dg-warning "'.interface' of class .NotKnown. not found" } */
                           /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept '\.\.\.' as arguments" "" { target *-*-* } 0 } */
index b6aa32d4f298f343c50da2ce137aaecd1850aa57..cae2d7ff6f7428b96078d25f34f131b6ffc86cfc 100644 (file)
@@ -23,9 +23,7 @@
     [MyIntermediate rootInstanceMethod];  /* with the same name.                       */
 
     [self instanceMethod];   /* { dg-warning ".MyDerived. may not respond to .\\+instanceMethod." } */
-       /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
-       /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
-       /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
+    /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
     [MyDerived instanceMethod];   /* { dg-warning ".MyDerived. may not respond to .\\+instanceMethod." } */
 }
 @end
index 89409143e14a75434b2efa97a5599e66723cfe49..277a7e9e223e050357be0a29315e0d9839a745c4 100644 (file)
@@ -11,12 +11,10 @@ void foo(UnderSpecified *u, NotAClass *n) {
   [n nonexistent_method];    /* { dg-warning "invalid receiver type" } */
        /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
   [NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
-  [u nonexistent_method];    /* { dg-warning ".interface of class .UnderSpecified. not found" } */
+  [u nonexistent_method];    /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
                              /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
-  [UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
+  [UnderSpecified nonexistent_method]; /* { dg-warning "'.interface' of class .UnderSpecified. not found" } */
                                        /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } .-1 } */
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 35676b18f0675d3e7b50f9087a4e68c8c817adfd..3ff73e0e9ca3b8ba144060c9a31b1788030b6485 100644 (file)
@@ -31,9 +31,7 @@ void foo(void) {
        /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } Derived_port_last } */
 
   [receiver starboard];  /* { dg-warning "no .\\+starboard. method found" } */
-       /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
-       /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
-       /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
+  /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
 
   [Class port];  /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
 }
index a5957aedbaa3b0bc2af02aaae88d70b3a8d9c255..314e8abaf8931093e20d71d65cdcc6d6c7af9b75 100644 (file)
@@ -18,9 +18,7 @@ id foo(void) {
   TestsuiteObject *obj = [[TestsuiteObject alloc] init];
   id obj2 = obj;
   [obj setWindow:nil];  /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
-  /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
-  /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
-  /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
+  /* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
   [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
   /* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } Class1_setWindow } */
   /* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } Class2_setWindow } */
index 47499c37c0836e7389e74e5f1b685c9eccfa8281..e458471ff2ce25bd473add5a67c1301ce07bd50d 100644 (file)
@@ -39,7 +39,7 @@ void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a,
 
   /* If a class is specified by name, the @interface must be available
      to check what it responds to.  */
-  [NotKnown classMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [NotKnown classMethod]; /* { dg-warning "'.interface' of class .NotKnown. not found" } */
 
 
   /* "id w" means that "w" responds to anything, both class and
@@ -70,7 +70,7 @@ void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a,
      because they expect the compiler to do type-checking; the
      @interface must be available to do this check, otherwise the
      compiler does not know what "a" responds to.  */
-  [a instanceMethod];  /* { dg-warning ".interface of class .NotKnown. not found" } */
+  [a instanceMethod];  /* { dg-warning "'.interface' of class .NotKnown. not found" } */
 
   /* But, if you cast it to "id", then you're disabling type-checking
      and the warnings should go away.  */
index fbd00f8d8ae23645096296e94905f040298dada0..0f409fc69ed488d15006b05f7cfe306bb31b34b5 100644 (file)
@@ -53,6 +53,4 @@ int foo(void) {
   return 0;
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 182e92d94b202a5e572f45b658724dda47d4e0a1..9d1def5f9de8973b5dc122345cbafa485f33a39a 100644 (file)
@@ -49,6 +49,4 @@ long foo(void) {
   return receiver;
 }
 
-/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
-/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */
-/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.. as arguments" "" { target *-*-* } 0 } */
index 9fb09b5f2bb9b33b06275f747cbba9bdc3f99c1c..33a6969a33d21e392c7612200bbdb2677468c46a 100644 (file)
@@ -25,7 +25,5 @@ void test1 (void)
 {
   [object1 method]; /* Ok */
   [object2 method]; /* { dg-warning ".MyClass. may not respond to ..method." } */
-                    /* { dg-warning "without a matching method" "" { target *-*-* } .-1 } */
-                    /* { dg-warning "will be assumed to return" "" { target *-*-* } .-2 } */
-                    /* { dg-warning "as arguments" "" { target *-*-* } .-3 } */
 }
+/* { dg-warning "messages without a matching method signature will be assumed to return .id. and accept .\.\.\.' as arguments" "" { target *-*-* } 0 } */
index 16a7b152d4d8f75e14a71ed07a2413fdf4010532..485000b54663bbf888d64bec493a129dd97943df 100644 (file)
@@ -484,9 +484,11 @@ recompile_files (void)
         the new file name already exists.  Therefore, we explicitly
         remove the old file first.  */
       if (remove (f->key) == -1)
-       fatal_error (input_location, "removing .rpo file: %m");
+       fatal_error (input_location,
+                    "removing repository file %qs: %m", f->key);
       if (rename (outname, f->key) == -1)
-       fatal_error (input_location, "renaming .rpo file: %m");
+       fatal_error (input_location, "renaming repository file from "
+                    "%qs to %qs: %m", outname, f->key);
 
       if (!f->args)
        {
index a27cdc4325d5d882801155dd6ece93c426867c78..d300ac2ec894ee947156616e71796d55d9d04307 100644 (file)
@@ -879,7 +879,7 @@ init_asm_output (const char *name)
                     asm_file_name);
       if (asm_out_file == 0)
        fatal_error (UNKNOWN_LOCATION,
-                    "can%'t open %qs for writing: %m", asm_file_name);
+                    "cannot open %qs for writing: %m", asm_file_name);
     }
 
   if (!flag_syntax_only)
@@ -1056,7 +1056,7 @@ open_auxiliary_file (const char *ext)
   filename = concat (aux_base_name, ".", ext, NULL);
   file = fopen (filename, "w");
   if (!file)
-    fatal_error (input_location, "can%'t open %s for writing: %m", filename);
+    fatal_error (input_location, "cannot open %s for writing: %m", filename);
   free (filename);
   return file;
 }
@@ -1666,7 +1666,7 @@ process_options (void)
       aux_info_file = fopen (aux_info_file_name, "w");
       if (aux_info_file == 0)
        fatal_error (UNKNOWN_LOCATION,
-                    "can%'t open %s: %m", aux_info_file_name);
+                    "cannot open %s: %m", aux_info_file_name);
     }
 
   if (!targetm_common.have_named_sections)
@@ -1737,7 +1737,7 @@ process_options (void)
     {
       warning_at (UNKNOWN_LOCATION, 0,
                  "%<-fstack-check=%> and %<-fstack-clash_protection%> are "
-                 "mutually exclusive.  Disabling %<-fstack-check=%>");
+                 "mutually exclusive; disabling %<-fstack-check=%>");
       flag_stack_check = NO_STACK_CHECK;
     }
 
@@ -2180,7 +2180,7 @@ do_compile ()
         on the squared numbers.  */
       if (mpfr_set_emin (2 * (min_exp - 1))
          || mpfr_set_emax (2 * (max_exp + 1)))
-       sorry ("mpfr not configured to handle all float modes");
+       sorry ("mpfr not configured to handle all floating modes");
 
       /* Set up the back-end if requested.  */
       if (!no_backend)
index 0581aae2d6900556dff2ee36422e0a7d367a6fc8..d16f5f9cad18b815826691ffb2222471fac60192 100644 (file)
@@ -754,10 +754,10 @@ diagnose_tm_1 (gimple_stmt_iterator *gsi, bool *handled_ops_p,
         Either that or get the language spec to resurrect __tm_waiver.  */
       if (d->block_flags & DIAG_TM_SAFE)
        error_at (gimple_location (stmt),
-                 "asm not allowed in atomic transaction");
+                 "%<asm%> not allowed in atomic transaction");
       else if (d->func_flags & DIAG_TM_SAFE)
        error_at (gimple_location (stmt),
-                 "asm not allowed in %<transaction_safe%> function");
+                 "%<asm%> not allowed in %<transaction_safe%> function");
       break;
 
     case GIMPLE_TRANSACTION:
@@ -4414,7 +4414,8 @@ ipa_tm_scan_irr_block (basic_block bb)
            {
              tree t = build1 (NOP_EXPR, void_type_node, size_zero_node);
              SET_EXPR_LOCATION (t, gimple_location (stmt));
-             error ("%Kasm not allowed in %<transaction_safe%> function", t);
+             error ("%K%<asm%> not allowed in %<transaction_safe%> function",
+                    t);
            }
          return true;
 
@@ -4788,7 +4789,7 @@ ipa_tm_diagnose_transaction (struct cgraph_node *node,
              if (gimple_code (stmt) == GIMPLE_ASM)
                {
                  error_at (gimple_location (stmt),
-                           "asm not allowed in atomic transaction");
+                           "%<asm%> not allowed in atomic transaction");
                  continue;
                }
 
index c6a70c8f10b1e8142973d57908cbc21d1d8f6e6f..4655d7f80735aaf1f6d14d9ead210fdce84e9e94 100644 (file)
@@ -2961,12 +2961,12 @@ verify_address (tree t, bool verify_addressable)
 
   if (old_constant != new_constant)
     {
-      error ("constant not recomputed when ADDR_EXPR changed");
+      error ("constant not recomputed when %<ADDR_EXPR%> changed");
       return true;
     }
   if (old_side_effects != new_side_effects)
     {
-      error ("side effects not recomputed when ADDR_EXPR changed");
+      error ("side effects not recomputed when %<ADDR_EXPR%> changed");
       return true;
     }
 
@@ -2981,13 +2981,13 @@ verify_address (tree t, bool verify_addressable)
 
   if (DECL_GIMPLE_REG_P (base))
     {
-      error ("DECL_GIMPLE_REG_P set on a variable with address taken");
+      error ("%<DECL_GIMPLE_REG_P%> set on a variable with address taken");
       return true;
     }
 
   if (verify_addressable && !TREE_ADDRESSABLE (base))
     {
-      error ("address taken, but ADDRESSABLE bit not set");
+      error ("address taken but %<TREE_ADDRESSABLE%> bit not set");
       return true;
     }
 
@@ -3036,6 +3036,8 @@ verify_types_in_gimple_min_lval (tree expr)
 static bool
 verify_types_in_gimple_reference (tree expr, bool require_lvalue)
 {
+  const char *code_name = get_tree_code_name (TREE_CODE (expr));
+
   if (TREE_CODE (expr) == REALPART_EXPR
       || TREE_CODE (expr) == IMAGPART_EXPR
       || TREE_CODE (expr) == BIT_FIELD_REF)
@@ -3043,7 +3045,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
       tree op = TREE_OPERAND (expr, 0);
       if (!is_gimple_reg_type (TREE_TYPE (expr)))
        {
-         error ("non-scalar BIT_FIELD_REF, IMAGPART_EXPR or REALPART_EXPR");
+         error ("non-scalar %qs", code_name);
          return true;
        }
 
@@ -3057,14 +3059,14 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
              || !types_compatible_p (bitsizetype, TREE_TYPE (t1))
              || !types_compatible_p (bitsizetype, TREE_TYPE (t2)))
            {
-             error ("invalid position or size operand to BIT_FIELD_REF");
+             error ("invalid position or size operand to %qs", code_name);
              return true;
            }
          if (INTEGRAL_TYPE_P (TREE_TYPE (expr))
              && maybe_ne (TYPE_PRECISION (TREE_TYPE (expr)), size))
            {
              error ("integral result type precision does not match "
-                    "field size of BIT_FIELD_REF");
+                    "field size of %qs", code_name);
              return true;
            }
          else if (!INTEGRAL_TYPE_P (TREE_TYPE (expr))
@@ -3073,13 +3075,14 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
                                size))
            {
              error ("mode size of non-integral result does not "
-                    "match field size of BIT_FIELD_REF");
+                    "match field size of %qs",
+                    code_name);
              return true;
            }
          if (INTEGRAL_TYPE_P (TREE_TYPE (op))
              && !type_has_mode_precision_p (TREE_TYPE (op)))
            {
-             error ("BIT_FIELD_REF of non-mode-precision operand");
+             error ("%qs of non-mode-precision operand", code_name);
              return true;
            }
          if (!AGGREGATE_TYPE_P (TREE_TYPE (op))
@@ -3087,7 +3090,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
                           tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (op)))))
            {
              error ("position plus size exceeds size of referenced object in "
-                    "BIT_FIELD_REF");
+                    "%qs", code_name);
              return true;
            }
        }
@@ -3097,7 +3100,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
          && !useless_type_conversion_p (TREE_TYPE (expr),
                                         TREE_TYPE (TREE_TYPE (op))))
        {
-         error ("type mismatch in real/imagpart reference");
+         error ("type mismatch in %qs reference", code_name);
          debug_generic_stmt (TREE_TYPE (expr));
          debug_generic_stmt (TREE_TYPE (TREE_TYPE (op)));
          return true;
@@ -3107,11 +3110,13 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
 
   while (handled_component_p (expr))
     {
+      code_name = get_tree_code_name (TREE_CODE (expr));
+
       if (TREE_CODE (expr) == REALPART_EXPR
          || TREE_CODE (expr) == IMAGPART_EXPR
          || TREE_CODE (expr) == BIT_FIELD_REF)
        {
-         error ("non-top-level BIT_FIELD_REF, IMAGPART_EXPR or REALPART_EXPR");
+         error ("non-top-level %qs", code_name);
          return true;
        }
 
@@ -3126,7 +3131,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
              || (TREE_OPERAND (expr, 3)
                  && !is_gimple_val (TREE_OPERAND (expr, 3))))
            {
-             error ("invalid operands to array reference");
+             error ("invalid operands to %qs", code_name);
              debug_generic_stmt (expr);
              return true;
            }
@@ -3137,7 +3142,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
          && !useless_type_conversion_p (TREE_TYPE (expr),
                                         TREE_TYPE (TREE_TYPE (op))))
        {
-         error ("type mismatch in array reference");
+         error ("type mismatch in %qs", code_name);
          debug_generic_stmt (TREE_TYPE (expr));
          debug_generic_stmt (TREE_TYPE (TREE_TYPE (op)));
          return true;
@@ -3146,7 +3151,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
          && !useless_type_conversion_p (TREE_TYPE (TREE_TYPE (expr)),
                                         TREE_TYPE (TREE_TYPE (op))))
        {
-         error ("type mismatch in array range reference");
+         error ("type mismatch in %qs", code_name);
          debug_generic_stmt (TREE_TYPE (TREE_TYPE (expr)));
          debug_generic_stmt (TREE_TYPE (TREE_TYPE (op)));
          return true;
@@ -3157,13 +3162,13 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
          if (TREE_OPERAND (expr, 2)
              && !is_gimple_val (TREE_OPERAND (expr, 2)))
            {
-             error ("invalid COMPONENT_REF offset operator");
+             error ("invalid %qs offset operator", code_name);
              return true;
            }
          if (!useless_type_conversion_p (TREE_TYPE (expr),
                                          TREE_TYPE (TREE_OPERAND (expr, 1))))
            {
-             error ("type mismatch in component reference");
+             error ("type mismatch in %qs", code_name);
              debug_generic_stmt (TREE_TYPE (expr));
              debug_generic_stmt (TREE_TYPE (TREE_OPERAND (expr, 1)));
              return true;
@@ -3181,14 +3186,16 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
              && (TREE_CODE (op) == SSA_NAME
                  || is_gimple_min_invariant (op)))
            {
-             error ("conversion of an SSA_NAME on the left hand side");
+             error ("conversion of %qs on the left hand side of %qs",
+                    get_tree_code_name (TREE_CODE (op)), code_name);
              debug_generic_stmt (expr);
              return true;
            }
          else if (TREE_CODE (op) == SSA_NAME
                   && TYPE_SIZE (TREE_TYPE (expr)) != TYPE_SIZE (TREE_TYPE (op)))
            {
-             error ("conversion of register to a different size");
+             error ("conversion of register to a different size in %qs",
+                    code_name);
              debug_generic_stmt (expr);
              return true;
            }
@@ -3199,20 +3206,22 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
       expr = op;
     }
 
+  code_name = get_tree_code_name (TREE_CODE (expr));
+
   if (TREE_CODE (expr) == MEM_REF)
     {
       if (!is_gimple_mem_ref_addr (TREE_OPERAND (expr, 0))
          || (TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR
              && verify_address (TREE_OPERAND (expr, 0), false)))
        {
-         error ("invalid address operand in MEM_REF");
+         error ("invalid address operand in %qs", code_name);
          debug_generic_stmt (expr);
          return true;
        }
       if (!poly_int_tree_p (TREE_OPERAND (expr, 1))
          || !POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 1))))
        {
-         error ("invalid offset operand in MEM_REF");
+         error ("invalid offset operand in %qs", code_name);
          debug_generic_stmt (expr);
          return true;
        }
@@ -3224,21 +3233,21 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
          || (TREE_CODE (TMR_BASE (expr)) == ADDR_EXPR
              && verify_address (TMR_BASE (expr), false)))
        {
-         error ("invalid address operand in TARGET_MEM_REF");
+         error ("invalid address operand in %qs", code_name);
          return true;
        }
       if (!TMR_OFFSET (expr)
          || !poly_int_tree_p (TMR_OFFSET (expr))
          || !POINTER_TYPE_P (TREE_TYPE (TMR_OFFSET (expr))))
        {
-         error ("invalid offset operand in TARGET_MEM_REF");
+         error ("invalid offset operand in %qs", code_name);
          debug_generic_stmt (expr);
          return true;
        }
     }
   else if (TREE_CODE (expr) == INDIRECT_REF)
     {
-      error ("INDIRECT_REF in gimple IL");
+      error ("%qs in gimple IL", code_name);
       debug_generic_stmt (expr);
       return true;
     }
@@ -3345,7 +3354,7 @@ verify_gimple_call (gcall *stmt)
       && gimple_call_noreturn_p (stmt)
       && should_remove_lhs_p (lhs))
     {
-      error ("LHS in noreturn call");
+      error ("LHS in %<noreturn%> call");
       return true;
     }
 
@@ -3536,6 +3545,8 @@ verify_gimple_assign_unary (gassign *stmt)
       return true;
     }
 
+  const char* const code_name = get_tree_code_name (rhs_code);
+
   /* First handle conversions.  */
   switch (rhs_code)
     {
@@ -3663,7 +3674,7 @@ verify_gimple_assign_unary (gassign *stmt)
          || maybe_ne (2 * TYPE_VECTOR_SUBPARTS (lhs_type),
                       TYPE_VECTOR_SUBPARTS (rhs1_type)))
        {
-         error ("type mismatch in vector unpack expression");
+         error ("type mismatch in %qs expression", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          return true;
@@ -3685,7 +3696,7 @@ verify_gimple_assign_unary (gassign *stmt)
          || TYPE_UNSIGNED (rhs1_type)
          || element_precision (lhs_type) != element_precision (rhs1_type))
        {
-         error ("invalid types for ABSU_EXPR");
+         error ("invalid types for %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          return true;
@@ -3696,7 +3707,7 @@ verify_gimple_assign_unary (gassign *stmt)
       if (TREE_CODE (lhs_type) != VECTOR_TYPE
          || !useless_type_conversion_p (TREE_TYPE (lhs_type), rhs1_type))
        {
-         error ("vec_duplicate should be from a scalar to a like vector");
+         error ("%qs should be from a scalar to a like vector", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          return true;
@@ -3746,6 +3757,8 @@ verify_gimple_assign_binary (gassign *stmt)
       return true;
     }
 
+  const char* const code_name = get_tree_code_name (rhs_code);
+
   /* First handle operations that involve different types.  */
   switch (rhs_code)
     {
@@ -3757,7 +3770,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || !(INTEGRAL_TYPE_P (rhs2_type)
                 || SCALAR_FLOAT_TYPE_P (rhs2_type)))
          {
-           error ("type mismatch in complex expression");
+           error ("type mismatch in %qs", code_name);
            debug_generic_expr (lhs_type);
            debug_generic_expr (rhs1_type);
            debug_generic_expr (rhs2_type);
@@ -3786,7 +3799,7 @@ verify_gimple_assign_binary (gassign *stmt)
                     && INTEGRAL_TYPE_P (TREE_TYPE (rhs2_type))))
            || !useless_type_conversion_p (lhs_type, rhs1_type))
          {
-           error ("type mismatch in shift expression");
+           error ("type mismatch in %qs", code_name);
            debug_generic_expr (lhs_type);
            debug_generic_expr (rhs1_type);
            debug_generic_expr (rhs2_type);
@@ -3803,7 +3816,7 @@ verify_gimple_assign_binary (gassign *stmt)
             || TREE_CODE (rhs2) != INTEGER_CST
             || (2 * TYPE_PRECISION (rhs1_type) > TYPE_PRECISION (lhs_type)))
           {
-            error ("type mismatch in widening vector shift expression");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -3824,7 +3837,7 @@ verify_gimple_assign_binary (gassign *stmt)
             || (2 * TYPE_PRECISION (TREE_TYPE (rhs1_type))
                 > TYPE_PRECISION (TREE_TYPE (lhs_type))))
           {
-            error ("type mismatch in widening vector shift expression");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -3845,7 +3858,7 @@ verify_gimple_assign_binary (gassign *stmt)
            if (TREE_CODE (rhs1_type) != VECTOR_TYPE
                || TREE_CODE (rhs2_type) != VECTOR_TYPE)
              {
-               error ("invalid non-vector operands to vector valued plus");
+               error ("invalid non-vector operands to %qs", code_name);
                return true;
              }
            lhs_etype = TREE_TYPE (lhs_type);
@@ -3856,7 +3869,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || POINTER_TYPE_P (rhs1_etype)
            || POINTER_TYPE_P (rhs2_etype))
          {
-           error ("invalid (pointer) operands to plus/minus");
+           error ("invalid (pointer) operands %qs", code_name);
            return true;
          }
 
@@ -3870,7 +3883,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || !useless_type_conversion_p (lhs_type, rhs1_type)
            || !ptrofftype_p (rhs2_type))
          {
-           error ("type mismatch in pointer plus expression");
+           error ("type mismatch in %qs", code_name);
            debug_generic_stmt (lhs_type);
            debug_generic_stmt (rhs1_type);
            debug_generic_stmt (rhs2_type);
@@ -3891,7 +3904,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || TYPE_UNSIGNED (lhs_type)
            || TYPE_PRECISION (lhs_type) != TYPE_PRECISION (rhs1_type))
          {
-           error ("type mismatch in pointer diff expression");
+           error ("type mismatch in %qs", code_name);
            debug_generic_stmt (lhs_type);
            debug_generic_stmt (rhs1_type);
            debug_generic_stmt (rhs2_type);
@@ -3945,7 +3958,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || maybe_lt (GET_MODE_SIZE (element_mode (rhs2_type)),
                         2 * GET_MODE_SIZE (element_mode (rhs1_type))))
           {
-            error ("type mismatch in widening sum reduction");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -3965,7 +3978,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || maybe_ne (GET_MODE_SIZE (element_mode (lhs_type)),
                         2 * GET_MODE_SIZE (element_mode (rhs1_type))))
           {
-            error ("type mismatch in vector widening multiplication");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -4001,7 +4014,7 @@ verify_gimple_assign_binary (gassign *stmt)
            || maybe_ne (2 * TYPE_VECTOR_SUBPARTS (rhs1_type),
                         TYPE_VECTOR_SUBPARTS (lhs_type)))
           {
-            error ("type mismatch in vector pack expression");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -4022,7 +4035,7 @@ verify_gimple_assign_binary (gassign *stmt)
          || maybe_ne (2 * TYPE_VECTOR_SUBPARTS (rhs1_type),
                       TYPE_VECTOR_SUBPARTS (lhs_type)))
        {
-         error ("type mismatch in vector pack expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4054,7 +4067,7 @@ verify_gimple_assign_binary (gassign *stmt)
     case VEC_SERIES_EXPR:
       if (!useless_type_conversion_p (rhs1_type, rhs2_type))
        {
-         error ("type mismatch in series expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
          return true;
@@ -4062,7 +4075,7 @@ verify_gimple_assign_binary (gassign *stmt)
       if (TREE_CODE (lhs_type) != VECTOR_TYPE
          || !useless_type_conversion_p (TREE_TYPE (lhs_type), rhs1_type))
        {
-         error ("vector type expected in series expression");
+         error ("vector type expected in %qs", code_name);
          debug_generic_expr (lhs_type);
          return true;
        }
@@ -4116,6 +4129,8 @@ verify_gimple_assign_ternary (gassign *stmt)
       return true;
     }
 
+  const char* const code_name = get_tree_code_name (rhs_code);
+
   /* First handle operations that involve different types.  */
   switch (rhs_code)
     {
@@ -4128,7 +4143,7 @@ verify_gimple_assign_ternary (gassign *stmt)
          || 2 * TYPE_PRECISION (rhs1_type) > TYPE_PRECISION (lhs_type)
          || TYPE_PRECISION (rhs1_type) != TYPE_PRECISION (rhs2_type))
        {
-         error ("type mismatch in widening multiply-accumulate expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4142,9 +4157,9 @@ verify_gimple_assign_ternary (gassign *stmt)
          || maybe_ne (TYPE_VECTOR_SUBPARTS (rhs1_type),
                       TYPE_VECTOR_SUBPARTS (lhs_type)))
        {
-         error ("the first argument of a VEC_COND_EXPR must be of a "
+         error ("the first argument of a %qs must be of a "
                 "boolean vector type of the same number of elements "
-                "as the result");
+                "as the result", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          return true;
@@ -4160,7 +4175,7 @@ verify_gimple_assign_ternary (gassign *stmt)
       if (!useless_type_conversion_p (lhs_type, rhs2_type)
          || !useless_type_conversion_p (lhs_type, rhs3_type))
        {
-         error ("type mismatch in conditional expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs2_type);
          debug_generic_expr (rhs3_type);
@@ -4172,7 +4187,7 @@ verify_gimple_assign_ternary (gassign *stmt)
       if (!useless_type_conversion_p (lhs_type, rhs1_type)
          || !useless_type_conversion_p (lhs_type, rhs2_type))
        {
-         error ("type mismatch in vector permute expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4184,7 +4199,7 @@ verify_gimple_assign_ternary (gassign *stmt)
          || TREE_CODE (rhs2_type) != VECTOR_TYPE
          || TREE_CODE (rhs3_type) != VECTOR_TYPE)
        {
-         error ("vector types expected in vector permute expression");
+         error ("vector types expected in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4199,8 +4214,8 @@ verify_gimple_assign_ternary (gassign *stmt)
          || maybe_ne (TYPE_VECTOR_SUBPARTS (rhs3_type),
                       TYPE_VECTOR_SUBPARTS (lhs_type)))
        {
-         error ("vectors with different element number found "
-                "in vector permute expression");
+         error ("vectors with different element number found in %qs",
+                code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4215,7 +4230,7 @@ verify_gimple_assign_ternary (gassign *stmt)
                  != GET_MODE_BITSIZE (SCALAR_TYPE_MODE
                                       (TREE_TYPE (rhs1_type))))))
        {
-         error ("invalid mask type in vector permute expression");
+         error ("invalid mask type in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4231,7 +4246,7 @@ verify_gimple_assign_ternary (gassign *stmt)
          || 2 * GET_MODE_UNIT_BITSIZE (TYPE_MODE (TREE_TYPE (rhs1_type)))
               > GET_MODE_UNIT_BITSIZE (TYPE_MODE (TREE_TYPE (lhs_type))))
        {
-         error ("type mismatch in sad expression");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4243,7 +4258,7 @@ verify_gimple_assign_ternary (gassign *stmt)
          || TREE_CODE (rhs2_type) != VECTOR_TYPE
          || TREE_CODE (rhs3_type) != VECTOR_TYPE)
        {
-         error ("vector types expected in sad expression");
+         error ("vector types expected in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
@@ -4256,7 +4271,7 @@ verify_gimple_assign_ternary (gassign *stmt)
     case BIT_INSERT_EXPR:
       if (! useless_type_conversion_p (lhs_type, rhs1_type))
        {
-         error ("type mismatch in BIT_INSERT_EXPR");
+         error ("type mismatch in %qs", code_name);
          debug_generic_expr (lhs_type);
          debug_generic_expr (rhs1_type);
          return true;
@@ -4275,7 +4290,7 @@ verify_gimple_assign_ternary (gassign *stmt)
                                TYPE_VECTOR_SUBPARTS (rhs2_type))
                 && multiple_of_p (bitsizetype, rhs3, TYPE_SIZE (rhs2_type)))))
        {
-         error ("not allowed type combination in BIT_INSERT_EXPR");
+         error ("not allowed type combination in %qs", code_name);
          debug_generic_expr (rhs1_type);
          debug_generic_expr (rhs2_type);
          return true;
@@ -4284,13 +4299,13 @@ verify_gimple_assign_ternary (gassign *stmt)
          || ! types_compatible_p (bitsizetype, TREE_TYPE (rhs3))
          || ! tree_fits_uhwi_p (TYPE_SIZE (rhs2_type)))
        {
-         error ("invalid position or size in BIT_INSERT_EXPR");
+         error ("invalid position or size in %qs", code_name);
          return true;
        }
       if (INTEGRAL_TYPE_P (rhs1_type)
          && !type_has_mode_precision_p (rhs1_type))
        {
-         error ("BIT_INSERT_EXPR into non-mode-precision operand");
+         error ("%qs into non-mode-precision operand", code_name);
          return true;
        }
       if (INTEGRAL_TYPE_P (rhs1_type))
@@ -4300,7 +4315,7 @@ verify_gimple_assign_ternary (gassign *stmt)
              || (bitpos + TYPE_PRECISION (rhs2_type)
                  > TYPE_PRECISION (rhs1_type)))
            {
-             error ("insertion out of range in BIT_INSERT_EXPR");
+             error ("insertion out of range in %qs", code_name);
              return true;
            }
        }
@@ -4310,7 +4325,7 @@ verify_gimple_assign_ternary (gassign *stmt)
          unsigned HOST_WIDE_INT bitsize = tree_to_uhwi (TYPE_SIZE (rhs2_type));
          if (bitpos % bitsize != 0)
            {
-             error ("vector insertion not at element boundary");
+             error ("%qs not at element boundary", code_name);
              return true;
            }
        }
@@ -4329,7 +4344,7 @@ verify_gimple_assign_ternary (gassign *stmt)
            || maybe_lt (GET_MODE_SIZE (element_mode (rhs3_type)),
                         2 * GET_MODE_SIZE (element_mode (rhs1_type))))
           {
-            error ("type mismatch in dot product reduction");
+           error ("type mismatch in %qs", code_name);
             debug_generic_expr (lhs_type);
             debug_generic_expr (rhs1_type);
             debug_generic_expr (rhs2_type);
@@ -4361,9 +4376,11 @@ verify_gimple_assign_single (gassign *stmt)
   tree rhs1_type = TREE_TYPE (rhs1);
   bool res = false;
 
+  const char* const code_name = get_tree_code_name (rhs_code);
+
   if (!useless_type_conversion_p (lhs_type, rhs1_type))
     {
-      error ("non-trivial conversion at assignment");
+      error ("non-trivial conversion in %qs", code_name);
       debug_generic_expr (lhs_type);
       debug_generic_expr (rhs1_type);
       return true;
@@ -4372,7 +4389,8 @@ verify_gimple_assign_single (gassign *stmt)
   if (gimple_clobber_p (stmt)
       && !(DECL_P (lhs) || TREE_CODE (lhs) == MEM_REF))
     {
-      error ("non-decl/MEM_REF LHS in clobber statement");
+      error ("%qs LHS in clobber statement",
+            get_tree_code_name (TREE_CODE (lhs)));
       debug_generic_expr (lhs);
       return true;
     }
@@ -4390,7 +4408,7 @@ verify_gimple_assign_single (gassign *stmt)
        tree op = TREE_OPERAND (rhs1, 0);
        if (!is_gimple_addressable (op))
          {
-           error ("invalid operand in unary expression");
+           error ("invalid operand in %qs", code_name);
            return true;
          }
 
@@ -4404,7 +4422,7 @@ verify_gimple_assign_single (gassign *stmt)
            && !one_pointer_to_useless_type_conversion_p (TREE_TYPE (rhs1),
                                                          TREE_TYPE (op)))
          {
-           error ("type mismatch in address expression");
+           error ("type mismatch in %qs", code_name);
            debug_generic_stmt (TREE_TYPE (rhs1));
            debug_generic_stmt (TREE_TYPE (op));
            return true;
@@ -4416,7 +4434,7 @@ verify_gimple_assign_single (gassign *stmt)
 
     /* tcc_reference  */
     case INDIRECT_REF:
-      error ("INDIRECT_REF in gimple IL");
+      error ("%qs in gimple IL", code_name);
       return true;
 
     case COMPONENT_REF:
@@ -4431,7 +4449,7 @@ verify_gimple_assign_single (gassign *stmt)
       if (!is_gimple_reg (lhs)
          && is_gimple_reg_type (TREE_TYPE (lhs)))
        {
-         error ("invalid rhs for gimple memory store");
+         error ("invalid RHS for gimple memory store: %qs", code_name);
          debug_generic_stmt (lhs);
          debug_generic_stmt (rhs1);
          return true;
@@ -4457,7 +4475,7 @@ verify_gimple_assign_single (gassign *stmt)
          && !is_gimple_reg (rhs1)
          && is_gimple_reg_type (TREE_TYPE (lhs)))
        {
-         error ("invalid rhs for gimple memory store");
+         error ("invalid RHS for gimple memory store: %qs", code_name);
          debug_generic_stmt (lhs);
          debug_generic_stmt (rhs1);
          return true;
@@ -4491,8 +4509,8 @@ verify_gimple_assign_single (gassign *stmt)
                      if (!useless_type_conversion_p (TREE_TYPE (rhs1_type),
                                                      TREE_TYPE (elt_t)))
                        {
-                         error ("incorrect type of vector CONSTRUCTOR"
-                                " elements");
+                         error ("incorrect type of vector %qs elements",
+                                code_name);
                          debug_generic_stmt (rhs1);
                          return true;
                        }
@@ -4500,8 +4518,8 @@ verify_gimple_assign_single (gassign *stmt)
                                         * TYPE_VECTOR_SUBPARTS (elt_t),
                                         TYPE_VECTOR_SUBPARTS (rhs1_type)))
                        {
-                         error ("incorrect number of vector CONSTRUCTOR"
-                                " elements");
+                         error ("incorrect number of vector %qs elements",
+                                code_name);
                          debug_generic_stmt (rhs1);
                          return true;
                        }
@@ -4509,14 +4527,16 @@ verify_gimple_assign_single (gassign *stmt)
                  else if (!useless_type_conversion_p (TREE_TYPE (rhs1_type),
                                                       elt_t))
                    {
-                     error ("incorrect type of vector CONSTRUCTOR elements");
+                     error ("incorrect type of vector %qs elements",
+                            code_name);
                      debug_generic_stmt (rhs1);
                      return true;
                    }
                  else if (maybe_gt (CONSTRUCTOR_NELTS (rhs1),
                                     TYPE_VECTOR_SUBPARTS (rhs1_type)))
                    {
-                     error ("incorrect number of vector CONSTRUCTOR elements");
+                     error ("incorrect number of vector %qs elements",
+                            code_name);
                      debug_generic_stmt (rhs1);
                      return true;
                    }
@@ -4532,13 +4552,15 @@ verify_gimple_assign_single (gassign *stmt)
                      || TREE_CODE (elt_i) != INTEGER_CST
                      || compare_tree_int (elt_i, i) != 0))
                {
-                 error ("vector CONSTRUCTOR with non-NULL element index");
+                 error ("vector %qs with non-NULL element index",
+                        code_name);
                  debug_generic_stmt (rhs1);
                  return true;
                }
              if (!is_gimple_val (elt_v))
                {
-                 error ("vector CONSTRUCTOR element is not a GIMPLE value");
+                 error ("vector %qs element is not a GIMPLE value",
+                        code_name);
                  debug_generic_stmt (rhs1);
                  return true;
                }
@@ -4546,7 +4568,7 @@ verify_gimple_assign_single (gassign *stmt)
        }
       else if (CONSTRUCTOR_NELTS (rhs1) != 0)
        {
-         error ("non-vector CONSTRUCTOR with elements");
+         error ("non-vector %qs with elements", code_name);
          debug_generic_stmt (rhs1);
          return true;
        }
@@ -4557,7 +4579,7 @@ verify_gimple_assign_single (gassign *stmt)
       rhs1 = fold (ASSERT_EXPR_COND (rhs1));
       if (rhs1 == boolean_false_node)
        {
-         error ("ASSERT_EXPR with an always-false condition");
+         error ("%qs with an always-false condition", code_name);
          debug_generic_stmt (rhs1);
          return true;
        }
@@ -4704,7 +4726,7 @@ verify_gimple_switch (gswitch *stmt)
 
       if (CASE_CHAIN (elt))
        {
-         error ("invalid CASE_CHAIN");
+         error ("invalid %<CASE_CHAIN%>");
          debug_generic_expr (elt);
          return true;
        }
@@ -4798,7 +4820,7 @@ verify_gimple_label (glabel *stmt)
       && (uid == -1
          || (*label_to_block_map_for_fn (cfun))[uid] != gimple_bb (stmt)))
     {
-      error ("incorrect entry in label_to_block_map");
+      error ("incorrect entry in %<label_to_block_map%>");
       err |= true;
     }
 
@@ -4915,7 +4937,7 @@ verify_gimple_phi (gphi *phi)
 
   if (!phi_result)
     {
-      error ("invalid PHI result");
+      error ("invalid %<PHI%> result");
       return true;
     }
 
@@ -4924,7 +4946,7 @@ verify_gimple_phi (gphi *phi)
       || (virtual_p
          && SSA_NAME_VAR (phi_result) != gimple_vop (cfun)))
     {
-      error ("invalid PHI result");
+      error ("invalid %<PHI%> result");
       err = true;
     }
 
@@ -4934,7 +4956,7 @@ verify_gimple_phi (gphi *phi)
 
       if (!t)
        {
-         error ("missing PHI def");
+         error ("missing %<PHI%> def");
          err |= true;
          continue;
        }
@@ -4948,14 +4970,14 @@ verify_gimple_phi (gphi *phi)
               || (!virtual_p
                   && !is_gimple_val (t)))
        {
-         error ("invalid PHI argument");
+         error ("invalid %<PHI%> argument");
          debug_generic_expr (t);
          err |= true;
        }
 #ifdef ENABLE_TYPES_CHECKING
       if (!useless_type_conversion_p (TREE_TYPE (phi_result), TREE_TYPE (t)))
        {
-         error ("incompatible types in PHI argument %u", i);
+         error ("incompatible types in %<PHI%> argument %u", i);
          debug_generic_stmt (TREE_TYPE (phi_result));
          debug_generic_stmt (TREE_TYPE (t));
          err |= true;
@@ -5053,7 +5075,7 @@ verify_gimple_in_seq (gimple_seq stmts)
 {
   timevar_push (TV_TREE_STMT_VERIFY);
   if (verify_gimple_in_seq_2 (stmts))
-    internal_error ("verify_gimple failed");
+    internal_error ("%<verify_gimple%> failed");
   timevar_pop (TV_TREE_STMT_VERIFY);
 }
 
@@ -5110,7 +5132,7 @@ verify_eh_throw_stmt_node (gimple *const &stmt, const int &,
 {
   if (!visited->contains (stmt))
     {
-      error ("dead STMT in EH table");
+      error ("dead statement in EH table");
       debug_gimple_stmt (stmt);
       eh_error_found = true;
     }
@@ -5234,6 +5256,14 @@ collect_subblocks (hash_set<tree> *blocks, tree block)
     }
 }
 
+/* Disable warnings about missing quoting in GCC diagnostics for
+   the verification errors.  Their format strings don't follow
+   GCC diagnostic conventions and trigger an ICE in the end.  */
+#if __GNUC__ >= 10
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Wformat-diag"
+#endif
+
 /* Verify the GIMPLE statements in the CFG of FN.  */
 
 DEBUG_FUNCTION void
@@ -5711,6 +5741,9 @@ gimple_verify_flow_info (void)
   return err;
 }
 
+#if __GNUC__ >= 10
+#  pragma GCC diagnostic pop
+#endif
 
 /* Updates phi nodes after creating a forwarder block joined
    by edge FALLTHRU.  */
@@ -9413,13 +9446,13 @@ do_warn_unused_result (gimple_seq seq)
 
              if (fdecl)
                warning_at (loc, OPT_Wunused_result,
-                           "ignoring return value of %qD, "
-                           "declared with attribute warn_unused_result",
+                           "ignoring return value of %qD "
+                           "declared with attribute %<warn_unused_result%>",
                            fdecl);
              else
                warning_at (loc, OPT_Wunused_result,
                            "ignoring return value of function "
-                           "declared with attribute warn_unused_result");
+                           "declared with attribute %<warn_unused_result%>");
            }
          break;
 
index 35c005ee9896ad6374e27f79e00d9a1ebd205691..7598674f39c58db7524be9a6f83af4629035dd2e 100644 (file)
@@ -4615,7 +4615,7 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
          /* PR 20090218-1_0.c. Body can be provided by another module. */
          && (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto))
        {
-         error ("inlining failed in call to always_inline %q+F: %s", fn,
+         error ("inlining failed in call to %<always_inline%> %q+F: %s", fn,
                 cgraph_inline_failed_string (reason));
          if (gimple_location (stmt) != UNKNOWN_LOCATION)
            inform (gimple_location (stmt), "called from here");
index 0ec2f56216ff85588201fc20f3b086932390b8b8..f2a91a1bfa18aa1c58dc48949c765c8cab4c2696 100644 (file)
@@ -3310,7 +3310,7 @@ update_ssa (unsigned update_flags)
 
                  if (SSA_NAME_IN_FREE_LIST (use))
                    {
-                     error ("statement uses released SSA name:");
+                     error ("statement uses released SSA name");
                      debug_gimple_stmt (stmt);
                      fprintf (stderr, "The use of ");
                      print_generic_expr (stderr, use);
index 73102c4e75bd3bf21815023d93bbef698a724d0d..cc8b4b8e709e3f00772c580a9b14796042b30046 100644 (file)
@@ -10009,8 +10009,10 @@ void
 omp_clause_check_failed (const_tree node, const char *file, int line,
                          const char *function, enum omp_clause_code code)
 {
-  internal_error ("tree check: expected omp_clause %s, have %s in %s, at %s:%d",
-                 omp_clause_code_name[code], get_tree_code_name (TREE_CODE (node)),
+  internal_error ("tree check: expected %<omp_clause %s%>, have %qs "
+                 "in %s, at %s:%d",
+                 omp_clause_code_name[code],
+                 get_tree_code_name (TREE_CODE (node)),
                  function, trim_filename (file), line);
 }
 
@@ -10083,7 +10085,8 @@ tree_int_cst_elt_check_failed (int idx, int len, const char *file, int line,
                               const char *function)
 {
   internal_error
-    ("tree check: accessed elt %d of tree_int_cst with %d elts in %s, at %s:%d",
+    ("tree check: accessed elt %d of %<tree_int_cst%> with %d elts in %s, "
+     "at %s:%d",
      idx + 1, len, function, trim_filename (file), line);
 }
 
@@ -10095,7 +10098,7 @@ tree_vec_elt_check_failed (int idx, int len, const char *file, int line,
                           const char *function)
 {
   internal_error
-    ("tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d",
+    ("tree check: accessed elt %d of %<tree_vec%> with %d elts in %s, at %s:%d",
      idx + 1, len, function, trim_filename (file), line);
 }
 
@@ -10121,7 +10124,7 @@ omp_clause_operand_check_failed (int idx, const_tree t, const char *file,
                                 int line, const char *function)
 {
   internal_error
-    ("tree check: accessed operand %d of omp_clause %s with %d operands "
+    ("tree check: accessed operand %d of %<omp_clause %s%> with %d operands "
      "in %s, at %s:%d", idx + 1, omp_clause_code_name[OMP_CLAUSE_CODE (t)],
      omp_clause_num_ops [OMP_CLAUSE_CODE (t)], function,
      trim_filename (file), line);
@@ -13853,11 +13856,11 @@ verify_type_variant (const_tree t, tree tv)
        {
          gcc_assert (!operand_equal_p (TYPE_SIZE_UNIT (t),
                                        TYPE_SIZE_UNIT (tv), 0));
-         error ("type variant has different TYPE_SIZE_UNIT");
+         error ("type variant has different %<TYPE_SIZE_UNIT%>");
          debug_tree (tv);
-         error ("type variant%'s TYPE_SIZE_UNIT");
+         error ("type variant%'s %<TYPE_SIZE_UNIT%>");
          debug_tree (TYPE_SIZE_UNIT (tv));
-         error ("type%'s TYPE_SIZE_UNIT");
+         error ("type%'s %<TYPE_SIZE_UNIT%>");
          debug_tree (TYPE_SIZE_UNIT (t));
          return false;
        }
@@ -13877,7 +13880,7 @@ verify_type_variant (const_tree t, tree tv)
   verify_variant_match (TYPE_STRING_FLAG);
   if (TYPE_ALIAS_SET_KNOWN_P (t))
     {
-      error ("type variant with TYPE_ALIAS_SET_KNOWN_P");
+      error ("type variant with %<TYPE_ALIAS_SET_KNOWN_P%>");
       debug_tree (tv);
       return false;
     }
@@ -13890,7 +13893,7 @@ verify_type_variant (const_tree t, tree tv)
       && (in_lto_p || !TYPE_VFIELD (tv)
          || TREE_CODE (TYPE_VFIELD (tv)) != TREE_LIST))
     {
-      error ("type variant has different TYPE_VFIELD");
+      error ("type variant has different %<TYPE_VFIELD%>");
       debug_tree (tv);
       return false;
     }
@@ -13926,11 +13929,11 @@ verify_type_variant (const_tree t, tree tv)
         at LTO time only.  */
       && (in_lto_p && odr_type_p (t)))
     {
-      error ("type variant has different TYPE_BINFO");
+      error ("type variant has different %<TYPE_BINFO%>");
       debug_tree (tv);
-      error ("type variant%'s TYPE_BINFO");
+      error ("type variant%'s %<TYPE_BINFO%>");
       debug_tree (TYPE_BINFO (tv));
-      error ("type%'s TYPE_BINFO");
+      error ("type%'s %<TYPE_BINFO%>");
       debug_tree (TYPE_BINFO (t));
       return false;
     }
@@ -13969,7 +13972,7 @@ verify_type_variant (const_tree t, tree tv)
          break;
       if (f1 || f2)
        {
-         error ("type variant has different TYPE_FIELDS");
+         error ("type variant has different %<TYPE_FIELDS%>");
          debug_tree (tv);
          error ("first mismatch is field");
          debug_tree (f1);
@@ -13990,11 +13993,11 @@ verify_type_variant (const_tree t, tree tv)
          || TYPE_MAIN_VARIANT (TREE_TYPE (t))
             != TYPE_MAIN_VARIANT (TREE_TYPE (tv))))
     {
-      error ("type variant has different TREE_TYPE");
+      error ("type variant has different %<TREE_TYPE%>");
       debug_tree (tv);
-      error ("type variant%'s TREE_TYPE");
+      error ("type variant%'s %<TREE_TYPE%>");
       debug_tree (TREE_TYPE (tv));
-      error ("type%'s TREE_TYPE");
+      error ("type%'s %<TREE_TYPE%>");
       debug_tree (TREE_TYPE (t));
       return false;
     }
@@ -14003,9 +14006,9 @@ verify_type_variant (const_tree t, tree tv)
     {
       error ("type is not compatible with its variant");
       debug_tree (tv);
-      error ("type variant%'s TREE_TYPE");
+      error ("type variant%'s %<TREE_TYPE%>");
       debug_tree (TREE_TYPE (tv));
-      error ("type%'s TREE_TYPE");
+      error ("type%'s %<TREE_TYPE%>");
       debug_tree (TREE_TYPE (t));
       return false;
     }
@@ -14304,12 +14307,12 @@ verify_type (const_tree t)
   tree mv = TYPE_MAIN_VARIANT (t);
   if (!mv)
     {
-      error ("Main variant is not defined");
+      error ("main variant is not defined");
       error_found = true;
     }
   else if (mv != TYPE_MAIN_VARIANT (mv))
     {
-      error ("TYPE_MAIN_VARIANT has different TYPE_MAIN_VARIANT");
+      error ("%<TYPE_MAIN_VARIANT%> has different %<TYPE_MAIN_VARIANT%>");
       debug_tree (mv);
       error_found = true;
     }
@@ -14321,7 +14324,7 @@ verify_type (const_tree t)
     ;
   else if (TYPE_CANONICAL (t) != ct)
     {
-      error ("TYPE_CANONICAL has different TYPE_CANONICAL");
+      error ("%<TYPE_CANONICAL%> has different %<TYPE_CANONICAL%>");
       debug_tree (ct);
       error_found = true;
     }
@@ -14340,7 +14343,7 @@ verify_type (const_tree t)
           && !gimple_canonical_types_compatible_p (t, ct, false)
           && COMPLETE_TYPE_P (t))
     {
-      error ("TYPE_CANONICAL is not compatible");
+      error ("%<TYPE_CANONICAL%> is not compatible");
       debug_tree (ct);
       error_found = true;
     }
@@ -14348,13 +14351,13 @@ verify_type (const_tree t)
   if (COMPLETE_TYPE_P (t) && TYPE_CANONICAL (t)
       && TYPE_MODE (t) != TYPE_MODE (TYPE_CANONICAL (t)))
     {
-      error ("TYPE_MODE of TYPE_CANONICAL is not compatible");
+      error ("%<TYPE_MODE%> of %<TYPE_CANONICAL%> is not compatible");
       debug_tree (ct);
       error_found = true;
     }
   if (TYPE_MAIN_VARIANT (t) == t && ct && TYPE_MAIN_VARIANT (ct) != ct)
    {
-      error ("TYPE_CANONICAL of main variant is not main variant");
+      error ("%<TYPE_CANONICAL%> of main variant is not main variant");
       debug_tree (ct);
       debug_tree (TYPE_MAIN_VARIANT (ct));
       error_found = true;
@@ -14370,7 +14373,7 @@ verify_type (const_tree t)
          && TREE_CODE (TYPE_VFIELD (t)) != FIELD_DECL
          && TREE_CODE (TYPE_VFIELD (t)) != TREE_LIST)
        {
-         error ("TYPE_VFIELD is not FIELD_DECL nor TREE_LIST");
+         error ("%<TYPE_VFIELD%> is not %<FIELD_DECL%> nor %<TREE_LIST%>");
          debug_tree (TYPE_VFIELD (t));
          error_found = true;
        }
@@ -14380,7 +14383,7 @@ verify_type (const_tree t)
       if (TYPE_NEXT_PTR_TO (t)
          && TREE_CODE (TYPE_NEXT_PTR_TO (t)) != POINTER_TYPE)
        {
-         error ("TYPE_NEXT_PTR_TO is not POINTER_TYPE");
+         error ("%<TYPE_NEXT_PTR_TO%> is not %<POINTER_TYPE%>");
          debug_tree (TYPE_NEXT_PTR_TO (t));
          error_found = true;
        }
@@ -14390,7 +14393,7 @@ verify_type (const_tree t)
       if (TYPE_NEXT_REF_TO (t)
          && TREE_CODE (TYPE_NEXT_REF_TO (t)) != REFERENCE_TYPE)
        {
-         error ("TYPE_NEXT_REF_TO is not REFERENCE_TYPE");
+         error ("%<TYPE_NEXT_REF_TO%> is not %<REFERENCE_TYPE%>");
          debug_tree (TYPE_NEXT_REF_TO (t));
          error_found = true;
        }
@@ -14411,13 +14414,13 @@ verify_type (const_tree t)
        ;
       else if (TREE_CODE (TYPE_BINFO (t)) != TREE_BINFO)
        {
-         error ("TYPE_BINFO is not TREE_BINFO");
+         error ("%<TYPE_BINFO%> is not %<TREE_BINFO%>");
          debug_tree (TYPE_BINFO (t));
          error_found = true;
        }
       else if (TREE_TYPE (TYPE_BINFO (t)) != TYPE_MAIN_VARIANT (t))
        {
-         error ("TYPE_BINFO type is not TYPE_MAIN_VARIANT");
+         error ("%<TYPE_BINFO%> type is not %<TYPE_MAIN_VARIANT%>");
          debug_tree (TREE_TYPE (TYPE_BINFO (t)));
          error_found = true;
        }
@@ -14428,7 +14431,7 @@ verify_type (const_tree t)
          && TREE_CODE (TYPE_METHOD_BASETYPE (t)) != RECORD_TYPE
          && TREE_CODE (TYPE_METHOD_BASETYPE (t)) != UNION_TYPE)
        {
-         error ("TYPE_METHOD_BASETYPE is not record nor union");
+         error ("%<TYPE_METHOD_BASETYPE%> is not record nor union");
          debug_tree (TYPE_METHOD_BASETYPE (t));
          error_found = true;
        }
@@ -14439,7 +14442,7 @@ verify_type (const_tree t)
          && TREE_CODE (TYPE_OFFSET_BASETYPE (t)) != RECORD_TYPE
          && TREE_CODE (TYPE_OFFSET_BASETYPE (t)) != UNION_TYPE)
        {
-         error ("TYPE_OFFSET_BASETYPE is not record nor union");
+         error ("%<TYPE_OFFSET_BASETYPE%> is not record nor union");
          debug_tree (TYPE_OFFSET_BASETYPE (t));
          error_found = true;
        }
@@ -14457,21 +14460,21 @@ verify_type (const_tree t)
       if (TYPE_ARRAY_MAX_SIZE (t)
          && TREE_CODE (TYPE_ARRAY_MAX_SIZE (t)) != INTEGER_CST)
         {
-         error ("TYPE_ARRAY_MAX_SIZE not INTEGER_CST");
+         error ("%<TYPE_ARRAY_MAX_SIZE%> not %<INTEGER_CST%>");
          debug_tree (TYPE_ARRAY_MAX_SIZE (t));
          error_found = true;
         } 
     }
   else if (TYPE_MAX_VALUE_RAW (t))
     {
-      error ("TYPE_MAX_VALUE_RAW non-NULL");
+      error ("%<TYPE_MAX_VALUE_RAW%> non-NULL");
       debug_tree (TYPE_MAX_VALUE_RAW (t));
       error_found = true;
     }
 
   if (TYPE_LANG_SLOT_1 (t) && in_lto_p)
     {
-      error ("TYPE_LANG_SLOT_1 (binfo) field is non-NULL");
+      error ("%<TYPE_LANG_SLOT_1 (binfo)%> field is non-NULL");
       debug_tree (TYPE_LANG_SLOT_1 (t));
       error_found = true;
     }
@@ -14487,7 +14490,7 @@ verify_type (const_tree t)
           CONST_DECL of ENUMERAL TYPE.  */
        if (TREE_CODE (value) != INTEGER_CST && TREE_CODE (value) != CONST_DECL)
          {
-           error ("Enum value is not CONST_DECL or INTEGER_CST");
+           error ("enum value is not %<CONST_DECL%> or %<INTEGER_CST%>");
            debug_tree (value);
            debug_tree (name);
            error_found = true;
@@ -14495,14 +14498,15 @@ verify_type (const_tree t)
        if (TREE_CODE (TREE_TYPE (value)) != INTEGER_TYPE
            && !useless_type_conversion_p (const_cast <tree> (t), TREE_TYPE (value)))
          {
-           error ("Enum value type is not INTEGER_TYPE nor convertible to the enum");
+           error ("enum value type is not %<INTEGER_TYPE%> nor convertible "
+                  "to the enum");
            debug_tree (value);
            debug_tree (name);
            error_found = true;
          }
        if (TREE_CODE (name) != IDENTIFIER_NODE)
          {
-           error ("Enum value name is not IDENTIFIER_NODE");
+           error ("enum value name is not %<IDENTIFIER_NODE%>");
            debug_tree (value);
            debug_tree (name);
            error_found = true;
@@ -14512,7 +14516,7 @@ verify_type (const_tree t)
     {
       if (TYPE_DOMAIN (t) && TREE_CODE (TYPE_DOMAIN (t)) != INTEGER_TYPE)
        {
-         error ("Array TYPE_DOMAIN is not integer type");
+         error ("array %<TYPE_DOMAIN%> is not integer type");
          debug_tree (TYPE_DOMAIN (t));
          error_found = true;
        }
@@ -14521,7 +14525,7 @@ verify_type (const_tree t)
     {
       if (TYPE_FIELDS (t) && !COMPLETE_TYPE_P (t) && in_lto_p)
        {
-         error ("TYPE_FIELDS defined in incomplete type");
+         error ("%<TYPE_FIELDS%> defined in incomplete type");
          error_found = true;
        }
       for (tree fld = TYPE_FIELDS (t); fld; fld = TREE_CHAIN (fld))
@@ -14543,7 +14547,7 @@ verify_type (const_tree t)
            ;
          else
            {
-             error ("Wrong tree in TYPE_FIELDS list");
+             error ("wrong tree in %<TYPE_FIELDS%> list");
              debug_tree (fld);
              error_found = true;
            }
@@ -14558,13 +14562,14 @@ verify_type (const_tree t)
     {
       if (TYPE_CACHED_VALUES_P (t) != (TYPE_CACHED_VALUES (t) != NULL))
        {
-         error ("TYPE_CACHED_VALUES_P is %i while TYPE_CACHED_VALUES is %p",
+         error ("%<TYPE_CACHED_VALUES_P%> is %i while %<TYPE_CACHED_VALUES%> "
+                "is %p",
                 TYPE_CACHED_VALUES_P (t), (void *)TYPE_CACHED_VALUES (t));
          error_found = true;
        }
       else if (TYPE_CACHED_VALUES_P (t) && TREE_CODE (TYPE_CACHED_VALUES (t)) != TREE_VEC)
        {
-         error ("TYPE_CACHED_VALUES is not TREE_VEC");
+         error ("%<TYPE_CACHED_VALUES%> is not %<TREE_VEC%>");
          debug_tree (TYPE_CACHED_VALUES (t));
          error_found = true;
        }
@@ -14577,7 +14582,7 @@ verify_type (const_tree t)
            if (TREE_VEC_ELT (TYPE_CACHED_VALUES (t), i)
                && TREE_TYPE (TREE_VEC_ELT (TYPE_CACHED_VALUES (t), i)) != t)
              {
-               error ("wrong TYPE_CACHED_VALUES entry");
+               error ("wrong %<TYPE_CACHED_VALUES%> entry");
                debug_tree (TREE_VEC_ELT (TYPE_CACHED_VALUES (t), i));
                error_found = true;
                break;
@@ -14590,20 +14595,20 @@ verify_type (const_tree t)
        /* C++ FE uses TREE_PURPOSE to store initial values.  */
        if (TREE_PURPOSE (l) && in_lto_p)
          {
-           error ("TREE_PURPOSE is non-NULL in TYPE_ARG_TYPES list");
+           error ("%<TREE_PURPOSE%> is non-NULL in %<TYPE_ARG_TYPES%> list");
            debug_tree (l);
            error_found = true;
          }
        if (!TYPE_P (TREE_VALUE (l)))
          {
-           error ("Wrong entry in TYPE_ARG_TYPES list");
+           error ("wrong entry in %<TYPE_ARG_TYPES%> list");
            debug_tree (l);
            error_found = true;
          }
       }
   else if (!is_lang_specific (t) && TYPE_VALUES_RAW (t))
     {
-      error ("TYPE_VALUES_RAW field is non-NULL");
+      error ("%<TYPE_VALUES_RAW%> field is non-NULL");
       debug_tree (TYPE_VALUES_RAW (t));
       error_found = true;
     }
@@ -14615,13 +14620,13 @@ verify_type (const_tree t)
       && TREE_CODE (t) != POINTER_TYPE
       && TYPE_CACHED_VALUES_P (t))
     {
-      error ("TYPE_CACHED_VALUES_P is set while it should not");
+      error ("%<TYPE_CACHED_VALUES_P%> is set while it should not be");
       error_found = true;
     }
   if (TYPE_STRING_FLAG (t)
       && TREE_CODE (t) != ARRAY_TYPE && TREE_CODE (t) != INTEGER_TYPE)
     {
-      error ("TYPE_STRING_FLAG is set on wrong type code");
+      error ("%<TYPE_STRING_FLAG%> is set on wrong type code");
       error_found = true;
     }
   
@@ -14631,14 +14636,14 @@ verify_type (const_tree t)
   if (TREE_CODE (t) == METHOD_TYPE
       && TYPE_MAIN_VARIANT (TYPE_METHOD_BASETYPE (t)) != TYPE_METHOD_BASETYPE (t))
     {
-       error ("TYPE_METHOD_BASETYPE is not main variant");
+       error ("%<TYPE_METHOD_BASETYPE%> is not main variant");
        error_found = true;
     }
 
   if (error_found)
     {
       debug_tree (const_cast <tree> (t));
-      internal_error ("verify_type failed");
+      internal_error ("%qs failed", __func__);
     }
 }
 
index 5013956cf86f8ce5920f2646baf5883d12762584..d34d2ab768543d5b9f97a6f91a22087cadc9920e 100644 (file)
@@ -535,7 +535,7 @@ verify_histograms (void)
          {
            if (hist->hvalue.stmt != stmt)
              {
-               error ("Histogram value statement does not correspond to "
+               error ("histogram value statement does not correspond to "
                       "the statement it is associated with");
                debug_gimple_stmt (stmt);
                dump_histogram_value (stderr, hist);
@@ -547,7 +547,7 @@ verify_histograms (void)
   if (VALUE_HISTOGRAMS (cfun))
     htab_traverse (VALUE_HISTOGRAMS (cfun), visit_hist, &visited_hists);
   if (error_found)
-    internal_error ("verify_histograms failed");
+    internal_error ("%qs failed", __func__);
 }
 
 /* Helper function for verify_histograms.  For each histogram reachable via htab
index cb43248ec492d8eb3287f24947b9c17b70cd18ac..9397152dbce7b3e238a32a62092ebc3e1b5fd7cf 100644 (file)
@@ -1878,7 +1878,9 @@ assemble_start_function (tree decl, const char *fnname)
   if (patch_area_entry > patch_area_size)
     {
       if (patch_area_size > 0)
-       warning (OPT_Wattributes, "patchable function entry > size");
+       warning (OPT_Wattributes,
+                "patchable function entry %wu exceeds size %wu",
+                patch_area_entry, patch_area_size);
       patch_area_entry = 0;
     }
 
index ae0dd017204657c9ccea63950e582e1dba401073..6be229b094ab8bd3c5112e7e5fcd963e14685745 100644 (file)
@@ -332,7 +332,7 @@ read_gcda_file (const char *filename)
         {
           if (((mask & 0xff) != 0xff))
             {
-              warning (0, "%s:tag `%x' is invalid\n", filename, tag);
+             warning (0, "%s:tag %qx is invalid", filename, tag);
               break;
             }
           tag_depth--;
@@ -347,7 +347,7 @@ read_gcda_file (const char *filename)
           if (depth && depth < tag_depth)
             {
               if (!GCOV_TAG_IS_SUBTAG (tags[depth - 1], tag))
-                warning (0, "%s:tag `%x' is incorrectly nested\n",
+               warning (0, "%s:tag %qx is incorrectly nested",
                          filename, tag);
             }
           depth = tag_depth;
@@ -362,18 +362,18 @@ read_gcda_file (const char *filename)
 
           actual_length = gcov_position () - base;
           if (actual_length > length)
-            warning (0, "%s:record size mismatch %lu bytes overread\n",
+           warning (0, "%s:record size mismatch %lu bytes overread",
                      filename, actual_length - length);
           else if (length > actual_length)
-            warning (0, "%s:record size mismatch %lu bytes unread\n",
+           warning (0, "%s:record size mismatch %lu bytes unread",
                      filename, length - actual_length);
        }
 
       gcov_sync (base, length);
       if ((error = gcov_is_error ()))
         {
-          warning (0, error < 0 ? "%s:counter overflow at %lu\n" :
-                                  "%s:read error at %lu\n", filename,
+         warning (0, error < 0 ? "%s:counter overflow at %lu" :
+                                 "%s:read error at %lu", filename,
                    (long unsigned) gcov_position ());
           break;
         }
index d8a52d719db086ed2b73b02b34988e6c164a824b..5423178ce714bdf289656ce2e3569b759fba6b66 100644 (file)
@@ -26,7 +26,7 @@ using std::any_cast;
 void test01()
 {
   const any y(1);
-  any_cast<int&>(y); // { dg-error "invalid static_cast" "" { target { *-*-* } } 461 }
+  any_cast<int&>(y); // { dg-error "invalid 'static_cast'" "" { target { *-*-* } } 461 }
   // { dg-error "Template argument must be constructible from a const value" "" { target { *-*-* } } 457 }
 }
 
@@ -40,6 +40,6 @@ void test02()
 void test03()
 {
   any y(1);
-  any_cast<int&>(std::move(y));  // { dg-error "invalid static_cast" "" { target { *-*-* } } 501 }
+  any_cast<int&>(std::move(y));  // { dg-error "invalid 'static_cast'" "" { target { *-*-* } } 501 }
   // { dg-error "Template argument must be constructible from an rvalue" "" { target { *-*-* } } 497 }
 }