diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-01-15 16:58:41 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:24 -0400 |
commit | e45796fe051db3a9f35a8a7fb4093f3852cadab4 (patch) | |
tree | 0d6d5a3bbee3d1a0b1ffc59f037ef156952b33c5 | |
parent | 0c1f6ae39d7b9c38da809c0a33cf27dcd36f6381 (diff) | |
download | gcc-e45796fe051db3a9f35a8a7fb4093f3852cadab4.zip gcc-e45796fe051db3a9f35a8a7fb4093f3852cadab4.tar.gz gcc-e45796fe051db3a9f35a8a7fb4093f3852cadab4.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/sem_attr.adb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |