From: Piotr Trojanek Date: Fri, 15 Jan 2021 15:58:41 +0000 (+0100) Subject: [Ada] Remove redundant condition for Image attribute and Ada version X-Git-Tag: basepoints/gcc-13~7779 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e45796fe051db3a9f35a8a7fb4093f3852cadab4;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index d198bdca0101..51d2e103feac 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