From 57136d60c69d4ac5c189fd7d5150227179cff79e Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 8 Dec 2021 23:24:13 +0100 Subject: [Ada] Fix inconsistent quoting in messages about compile-time errors gcc/ada/ * exp_ch4.adb (Raise_Accessibility_Error): Move exception name to the message string; move << control characters to the end, for consistency. * sem_ch6.adb (Analyze_Function_Return): Likewise. * sem_util.adb (Compile_Time_Constraint_Error): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity): Remove quotes around Storage_Error. * gcc-interface/trans.c (gnat_to_gnu): Remove quotes around Constraint_Error. gcc/testsuite/ * gnat.dg/aggr26.adb: Update expected error message. --- gcc/ada/gcc-interface/decl.c | 2 +- gcc/ada/gcc-interface/trans.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/ada/gcc-interface') diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index af6b6bd..8c0703a 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1400,7 +1400,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 diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 3d0820f..f767cc6 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -8300,7 +8300,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, -- cgit v1.1