From 57136d60c69d4ac5c189fd7d5150227179cff79e Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 8 Dec 2021 23:24:13 +0100 Subject: [PATCH] [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/exp_ch4.adb | 4 ++-- gcc/ada/gcc-interface/decl.c | 2 +- gcc/ada/gcc-interface/trans.c | 2 +- gcc/ada/sem_ch6.adb | 2 +- gcc/ada/sem_util.adb | 17 ++++++++--------- gcc/testsuite/gnat.dg/aggr26.adb | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index bf96e64..262e40e 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -11885,8 +11885,8 @@ package body Exp_Ch4 is Reason => PE_Accessibility_Check_Failed)); Set_Etype (N, Target_Type); - Error_Msg_N ("< (others => 0)); -- { dg-warning "\"Storage_Error\" will be raised at run time" } + H : array (Positive) of Row := (others => (others => 0)); -- { dg-warning "Storage_Error will be raised at run time" } begin null; -- 2.7.4