From e45796fe051db3a9f35a8a7fb4093f3852cadab4 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 15 Jan 2021 16:58:41 +0100 Subject: [PATCH] [Ada] Remove redundant condition for Image attribute and Ada version gcc/ada/ * sem_attr.adb (Analyze_Image_Attribute): Remove redundant condition; add a missing header box. --- gcc/ada/sem_attr.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index d198bdc..51d2e103f 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -1467,6 +1467,10 @@ package body Sem_Attr is -- Check that Image_Type is legal as the type of a prefix of 'Image. -- Legality depends on the Ada language version. + ---------------------- + -- Check_Image_Type -- + ---------------------- + procedure Check_Image_Type (Image_Type : Entity_Id) is begin -- Image_Type may be empty in case of another error detected, @@ -1493,7 +1497,7 @@ package body Sem_Attr is Set_Etype (N, Str_Typ); Check_Image_Type (Etype (P)); - if Attr_Id /= Attribute_Img and then Ada_Version < Ada_2012 then + if Attr_Id /= Attribute_Img then Error_Msg_Ada_2012_Feature ("|Object''Image", Sloc (P)); end if; else -- 2.7.4