From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id A27AD3864858; Fri, 21 May 2021 09:15:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A27AD3864858 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-968] Replace ? with ?? in warning messages X-Act-Checkin: gcc X-Git-Author: Ghjuvan Lacambre X-Git-Refname: refs/heads/master X-Git-Oldrev: dd9a8fff14eda90fcaa3ac4b6b68ceded72a6af5 X-Git-Newrev: 4a29b8d62726d100e1c5ea1e3401309a1437c6be Message-Id: <20210521091506.A27AD3864858@sourceware.org> Date: Fri, 21 May 2021 09:15:06 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 09:15:06 -0000 https://gcc.gnu.org/g:4a29b8d62726d100e1c5ea1e3401309a1437c6be commit r12-968-g4a29b8d62726d100e1c5ea1e3401309a1437c6be Author: Ghjuvan Lacambre Date: Fri May 21 11:14:13 2021 +0200 Replace ? with ?? in warning messages The former has been deprecated in favor of the latter. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ? with ??. (gnat_to_gnu_param): Likewise. (gnat_to_gnu_subprog_type): Likewise. (warn_on_field_placement): Likewise. (intrin_arglists_compatible_p): Likewise. * gcc-interface/trans.c (Pragma_to_gnu): Likewise. (gnat_to_gnu): Likewise. (validate_unchecked_conversion): Likewise. * gcc-interface/utils.c (maybe_pad_type): Likewise. Diff: --- gcc/ada/gcc-interface/decl.c | 34 +++++++++++++++++----------------- gcc/ada/gcc-interface/trans.c | 22 +++++++++++----------- gcc/ada/gcc-interface/utils.c | 4 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 8d3c16c624b..c7d61763db1 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1392,7 +1392,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) if (TREE_CODE (TYPE_SIZE_UNIT (gnu_alloc_type)) == INTEGER_CST && !valid_constant_size_p (TYPE_SIZE_UNIT (gnu_alloc_type))) - post_error ("?`Storage_Error` will be raised at run time!", + post_error ("??`Storage_Error` will be raised at run time!", gnat_entity); gnu_expr @@ -4328,7 +4328,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) ratio is greater or equal to the byte/bit ratio. */ if (tree_fits_uhwi_p (size) && align >= tree_to_uhwi (size) * BITS_PER_UNIT) - post_error_ne ("?suspiciously large alignment specified for&", + post_error_ne ("??suspiciously large alignment specified for&", Expression (Alignment_Clause (gnat_entity)), gnat_entity); } @@ -5443,7 +5443,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, tree gnu_param_type, bool first, input_location = saved_location; if (mech == By_Copy && (by_ref || by_component_ptr)) - post_error ("?cannot pass & by copy", gnat_param); + post_error ("??cannot pass & by copy", gnat_param); /* If this is an Out parameter that isn't passed by reference and whose type doesn't require the initialization of formals, we don't make a @@ -6271,7 +6271,7 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition, if (!intrin_profiles_compatible_p (&inb)) post_error - ("?profile of& doesn''t match the builtin it binds!", + ("??profile of& doesn''t match the builtin it binds!", gnat_subprog); return gnu_builtin_decl; @@ -6284,7 +6284,7 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition, on demand without risking false positives with common default sets of options. */ if (warn_shadow) - post_error ("?gcc intrinsic not found for&!", gnat_subprog); + post_error ("??gcc intrinsic not found for&!", gnat_subprog); } } @@ -7597,20 +7597,20 @@ warn_on_field_placement (tree gnu_field, Node_Id gnat_component_list, const char *msg1 = in_variant - ? "?variant layout may cause performance issues" - : "?record layout may cause performance issues"; + ? "??variant layout may cause performance issues" + : "??record layout may cause performance issues"; const char *msg2 = Ekind (gnat_field) == E_Discriminant - ? "?discriminant & whose length is not multiple of a byte" + ? "??discriminant & whose length is not multiple of a byte" : field_has_self_size (gnu_field) - ? "?component & whose length depends on a discriminant" + ? "??component & whose length depends on a discriminant" : field_has_variable_size (gnu_field) - ? "?component & whose length is not fixed" - : "?component & whose length is not multiple of a byte"; + ? "??component & whose length is not fixed" + : "??component & whose length is not multiple of a byte"; const char *msg3 = do_reorder - ? "?comes too early and was moved down" - : "?comes too early and ought to be moved down"; + ? "??comes too early and was moved down" + : "??comes too early and ought to be moved down"; post_error (msg1, gnat_field); post_error_ne (msg2, gnat_field, gnat_field); @@ -9481,14 +9481,14 @@ intrin_arglists_compatible_p (intrin_binding_t * inb) if (ada_type == void_type_node && btin_type != void_type_node) { - post_error ("?Ada arguments list too short!", inb->gnat_entity); + post_error ("??Ada arguments list too short!", inb->gnat_entity); return false; } if (btin_type == void_type_node && ada_type != void_type_node) { - post_error_ne_num ("?Ada arguments list too long ('> ^)!", + post_error_ne_num ("??Ada arguments list too long ('> ^)!", inb->gnat_entity, inb->gnat_entity, argpos); return false; } @@ -9497,7 +9497,7 @@ intrin_arglists_compatible_p (intrin_binding_t * inb) argpos ++; if (intrin_types_incompatible_p (ada_type, btin_type)) { - post_error_ne_num ("?intrinsic binding type mismatch on argument ^!", + post_error_ne_num ("??intrinsic binding type mismatch on argument ^!", inb->gnat_entity, inb->gnat_entity, argpos); return false; } @@ -9528,7 +9528,7 @@ intrin_return_compatible_p (intrin_binding_t * inb) handles void/void as well. */ if (intrin_types_incompatible_p (btin_return_type, ada_return_type)) { - post_error ("?intrinsic binding type mismatch on return value!", + post_error ("??intrinsic binding type mismatch on return value!", inb->gnat_entity); return false; } diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index adbbbb11aea..289a2efcaf1 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -1453,17 +1453,17 @@ Pragma_to_gnu (Node_Id gnat_node) { case Name_Off: if (optimize) - post_error ("must specify -O0?", gnat_node); + post_error ("must specify -O0??", gnat_node); break; case Name_Space: if (!optimize_size) - post_error ("must specify -Os?", gnat_node); + post_error ("must specify -Os??", gnat_node); break; case Name_Time: if (!optimize) - post_error ("insufficient -O value?", gnat_node); + post_error ("insufficient -O value??", gnat_node); break; default: @@ -1473,7 +1473,7 @@ Pragma_to_gnu (Node_Id gnat_node) case Pragma_Reviewable: if (write_symbols == NO_DEBUG) - post_error ("must specify -g?", gnat_node); + post_error ("must specify -g??", gnat_node); break; case Pragma_Warning_As_Error: @@ -1574,17 +1574,17 @@ Pragma_to_gnu (Node_Id gnat_node) option_index = find_opt (option_string + 1, lang_mask); if (option_index == OPT_SPECIAL_unknown) { - post_error ("?unknown -W switch", gnat_node); + post_error ("unknown -W switch??", gnat_node); break; } else if (!(cl_options[option_index].flags & CL_WARNING)) { - post_error ("?-W switch does not control warning", gnat_node); + post_error ("-W switch does not control warning??", gnat_node); break; } else if (!(cl_options[option_index].flags & lang_mask)) { - post_error ("?-W switch not valid for Ada", gnat_node); + post_error ("-W switch not valid for Ada??", gnat_node); break; } if (cl_options[option_index].flags & CL_JOINED) @@ -6970,7 +6970,7 @@ gnat_to_gnu (Node_Id gnat_node) if (align != 0 && align < oalign && !TYPE_ALIGN_OK (gnu_obj_type)) post_error_ne_tree_2 - ("?source alignment (^) '< alignment of & (^)", + ("??source alignment (^) '< alignment of & (^)", gnat_node, Designated_Type (Etype (gnat_node)), size_int (align / BITS_PER_UNIT), oalign / BITS_PER_UNIT); } @@ -8285,7 +8285,7 @@ gnat_to_gnu (Node_Id gnat_node) /* If the result is a constant that overflowed, raise Constraint_Error. */ if (TREE_CODE (gnu_result) == INTEGER_CST && TREE_OVERFLOW (gnu_result)) { - post_error ("?`Constraint_Error` will be raised at run time", gnat_node); + post_error ("??`Constraint_Error` will be raised at run time", gnat_node); gnu_result = build1 (NULL_EXPR, gnu_result_type, build_call_raise (CE_Overflow_Check_Failed, gnat_node, @@ -10322,7 +10322,7 @@ validate_unchecked_conversion (Node_Id gnat_node) || !alias_sets_conflict_p (get_alias_set (gnu_source_desig_type), target_alias_set))) { - post_error_ne ("?possible aliasing problem for type&", + post_error_ne ("??possible aliasing problem for type&", gnat_node, Target_Type (gnat_node)); post_error ("\\?use -fno-strict-aliasing switch for references", gnat_node); @@ -10348,7 +10348,7 @@ validate_unchecked_conversion (Node_Id gnat_node) || !alias_sets_conflict_p (get_alias_set (gnu_source_desig_type), target_alias_set))) { - post_error_ne ("?possible aliasing problem for type&", + post_error_ne ("??possible aliasing problem for type&", gnat_node, Target_Type (gnat_node)); post_error ("\\?use -fno-strict-aliasing switch for references", gnat_node); diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 8539fe497e1..8de85991663 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -1721,11 +1721,11 @@ built: if (Comes_From_Source (gnat_entity)) { if (is_component_type) - post_error_ne_tree ("component of& padded{ by ^ bits}?", + post_error_ne_tree ("component of& padded{ by ^ bits}??", gnat_entity, gnat_entity, size_diffop (size, orig_size)); else if (Present (gnat_error_node)) - post_error_ne_tree ("{^ }bits of & unused?", + post_error_ne_tree ("{^ }bits of & unused??", gnat_error_node, gnat_entity, size_diffop (size, orig_size)); }