diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-11-27 19:21:15 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-11-27 19:21:15 -0500 |
commit | 9f06b910a840d8ed06e27942bc23f260a0e0ccf3 (patch) | |
tree | fe00f4931125a682b60d912a8db67ca415bff924 /gcc/go | |
parent | 7a656d7461c226eab1255cb5f76086bbe9e41a66 (diff) | |
download | gcc-9f06b910a840d8ed06e27942bc23f260a0e0ccf3.zip gcc-9f06b910a840d8ed06e27942bc23f260a0e0ccf3.tar.gz gcc-9f06b910a840d8ed06e27942bc23f260a0e0ccf3.tar.bz2 |
diagnostics: replace %<%s%> with %qs [PR104896]
No functional change intended.
gcc/analyzer/ChangeLog:
PR c/104896
* sm-malloc.cc: Replace "%<%s%>" with "%qs" in message wording.
gcc/c-family/ChangeLog:
PR c/104896
* c-lex.cc (c_common_lex_availability_macro): Replace "%<%s%>"
with "%qs" in message wording.
* c-opts.cc (c_common_handle_option): Likewise.
* c-warn.cc (warn_parm_array_mismatch): Likewise.
gcc/ChangeLog:
PR c/104896
* common/config/ia64/ia64-common.cc (ia64_handle_option): Replace
"%<%s%>" with "%qs" in message wording.
* common/config/rs6000/rs6000-common.cc (rs6000_handle_option):
Likewise.
* config/aarch64/aarch64.cc (aarch64_validate_sls_mitigation):
Likewise.
(aarch64_override_options): Likewise.
(aarch64_process_target_attr): Likewise.
* config/arm/aarch-common.cc (aarch_validate_mbranch_protection):
Likewise.
* config/pru/pru.cc (pru_insert_attributes): Likewise.
* config/riscv/riscv-target-attr.cc
(riscv_target_attr_parser::parse_arch): Likewise.
* omp-general.cc (oacc_verify_routine_clauses): Likewise.
* tree-ssa-uninit.cc (maybe_warn_read_write_only): Likewise.
(maybe_warn_pass_by_reference): Likewise.
gcc/cp/ChangeLog:
PR c/104896
* cvt.cc (maybe_warn_nodiscard): Replace "%<%s%>" with "%qs" in
message wording.
gcc/fortran/ChangeLog:
PR c/104896
* resolve.cc (resolve_operator): Replace "%<%s%>" with "%qs" in
message wording.
gcc/go/ChangeLog:
PR c/104896
* gofrontend/embed.cc (Gogo::initializer_for_embeds): Replace
"%<%s%>" with "%qs" in message wording.
* gofrontend/expressions.cc
(Selector_expression::lower_method_expression): Likewise.
* gofrontend/gogo.cc (Gogo::set_package_name): Likewise.
(Named_object::export_named_object): Likewise.
* gofrontend/parse.cc (Parse::struct_type): Likewise.
(Parse::parameter_list): Likewise.
gcc/rust/ChangeLog:
PR c/104896
* backend/rust-compile-expr.cc
(CompileExpr::compile_integer_literal): Replace "%<%s%>" with
"%qs" in message wording.
(CompileExpr::compile_float_literal): Likewise.
* backend/rust-compile-intrinsic.cc (Intrinsics::compile):
Likewise.
* backend/rust-tree.cc (maybe_warn_nodiscard): Likewise.
* checks/lints/rust-lint-scan-deadcode.h: Likewise.
* lex/rust-lex.cc (Lexer::parse_partial_unicode_escape): Likewise.
(Lexer::parse_raw_byte_string): Likewise.
* lex/rust-token.cc (Token::get_str): Likewise.
* metadata/rust-export-metadata.cc
(PublicInterface::write_to_path): Likewise.
* parse/rust-parse.cc
(peculiar_fragment_match_compatible_fragment): Likewise.
(peculiar_fragment_match_compatible): Likewise.
* resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path):
Likewise.
* resolve/rust-ast-resolve-toplevel.h: Likewise.
* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go):
Likewise.
* rust-session-manager.cc (validate_crate_name): Likewise.
(Session::load_extern_crate): Likewise.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Likewise.
(TypeCheckExpr::resolve_fn_trait_call): Likewise.
* typecheck/rust-hir-type-check-implitem.cc
(TypeCheckImplItemWithTrait::visit): Likewise.
* typecheck/rust-hir-type-check-item.cc
(TypeCheckItem::validate_trait_impl_block): Likewise.
* typecheck/rust-hir-type-check-struct.cc
(TypeCheckStructExpr::visit): Likewise.
* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit):
Likewise.
* typecheck/rust-tyty.cc (BaseType::bounds_compatible): Likewise.
* typecheck/rust-unify.cc (UnifyRules::emit_abi_mismatch):
Likewise.
* util/rust-attributes.cc (AttributeChecker::visit): Likewise.
libcpp/ChangeLog:
PR c/104896
* pch.cc (cpp_valid_state): Replace "%<%s%>" with "%qs" in message
wording.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/embed.cc | 4 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 8 | ||||
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 4 | ||||
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/gcc/go/gofrontend/embed.cc b/gcc/go/gofrontend/embed.cc index 6dada5e..d995ccf 100644 --- a/gcc/go/gofrontend/embed.cc +++ b/gcc/go/gofrontend/embed.cc @@ -792,7 +792,7 @@ Gogo::initializer_for_embeds(Type* type, { go_error_at(loc, ("invalid go:embed: build system did not " - "map pattern %<%s%>"), + "map pattern %qs"), pe->c_str()); continue; } @@ -807,7 +807,7 @@ Gogo::initializer_for_embeds(Type* type, { go_error_at(loc, ("invalid go:embed: build system did not " - "map file %<%s%>"), + "map file %qs"), pf->c_str()); continue; } diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 2b0e40f..931fad4 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9079,12 +9079,12 @@ Selector_expression::lower_method_expression(Gogo* gogo) if (nt != NULL) { if (!is_ambiguous) - go_error_at(location, "type %<%s%s%> has no method %<%s%>", + go_error_at(location, "type %<%s%s%> has no method %qs", is_pointer ? "*" : "", nt->message_name().c_str(), Gogo::message_name(name).c_str()); else - go_error_at(location, "method %<%s%s%> is ambiguous in type %<%s%>", + go_error_at(location, "method %<%s%s%> is ambiguous in type %qs", Gogo::message_name(name).c_str(), is_pointer ? "*" : "", nt->message_name().c_str()); @@ -9092,10 +9092,10 @@ Selector_expression::lower_method_expression(Gogo* gogo) else { if (!is_ambiguous) - go_error_at(location, "type has no method %<%s%>", + go_error_at(location, "type has no method %qs", Gogo::message_name(name).c_str()); else - go_error_at(location, "method %<%s%> is ambiguous", + go_error_at(location, "method %qs is ambiguous", Gogo::message_name(name).c_str()); } return Expression::make_error(location); diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 71988dc..8a83376 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -358,7 +358,7 @@ Gogo::set_package_name(const std::string& package_name, if (this->package_ != NULL) { if (this->package_->package_name() != package_name) - go_error_at(location, "expected package %<%s%>", + go_error_at(location, "expected package %qs", Gogo::message_name(this->package_->package_name()).c_str()); return; } @@ -8835,7 +8835,7 @@ Named_object::export_named_object(Export* exp) const case NAMED_OBJECT_TYPE_DECLARATION: go_error_at(this->type_declaration_value()->location(), - "attempt to export %<%s%> which was declared but not defined", + "attempt to export %qs which was declared but not defined", this->message_name().c_str()); break; diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index a4e4ae3..8456501 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -511,7 +511,7 @@ Parse::struct_type() { if (pi->field_name() == pj->field_name() && !Gogo::is_sink_name(pi->field_name())) - go_error_at(pi->location(), "duplicate field name %<%s%>", + go_error_at(pi->location(), "duplicate field name %qs", Gogo::message_name(pi->field_name()).c_str()); } } @@ -966,7 +966,7 @@ Parse::parameter_list(bool* is_varargs) type = Type::make_forward_declaration(no); else { - go_error_at(p->location(), "expected %<%s%> to be a type", + go_error_at(p->location(), "expected %qs to be a type", Gogo::message_name(p->name()).c_str()); saw_error = true; type = Type::make_error_type(); |