aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch4.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2023-03-27 18:07:17 -0400
committerMarc Poulhiès <poulhies@adacore.com>2023-05-26 09:29:19 +0200
commit53d45e492ebb88a84d6440e7db089d5f78610274 (patch)
tree8aab9d89ce2967d3af7a22e4fd470bcc35dfe6de /gcc/ada/par-ch4.adb
parentfa4b7069a0dfd28b58c718cf8b2060df47a39641 (diff)
downloadgcc-53d45e492ebb88a84d6440e7db089d5f78610274.zip
gcc-53d45e492ebb88a84d6440e7db089d5f78610274.tar.gz
gcc-53d45e492ebb88a84d6440e7db089d5f78610274.tar.bz2
ada: Fix crash on 'Img as generic actual function
'Image is allowed as an actual for a generic formal function. This patch fixes a crash when 'Img is used instead of 'Image in that context. Misc cleanups. gcc/ada/ * exp_put_image.adb (Build_Image_Call): Treat 'Img the same as 'Image. * exp_imgv.adb (Expand_Image_Attribute): If Discard_Names, expand to 'Image instead of 'Img. * snames.ads-tmpl, par-ch4.adb, sem_attr.adb, sem_attr.ads: Cleanups: Rename Attribute_Class_Array to be Attribute_Set. Remove unnecessary qualifications. DRY: Don't repeat "True".
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r--gcc/ada/par-ch4.adb22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index 2505eb6..52f2b02 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -34,17 +34,17 @@ package body Ch4 is
-- Attributes that cannot have arguments
- Is_Parameterless_Attribute : constant Attribute_Class_Array :=
- (Attribute_Base => True,
- Attribute_Body_Version => True,
- Attribute_Class => True,
- Attribute_External_Tag => True,
- Attribute_Img => True,
- Attribute_Loop_Entry => True,
- Attribute_Old => True,
- Attribute_Result => True,
- Attribute_Stub_Type => True,
- Attribute_Version => True,
+ Is_Parameterless_Attribute : constant Attribute_Set :=
+ (Attribute_Base |
+ Attribute_Body_Version |
+ Attribute_Class |
+ Attribute_External_Tag |
+ Attribute_Img |
+ Attribute_Loop_Entry |
+ Attribute_Old |
+ Attribute_Result |
+ Attribute_Stub_Type |
+ Attribute_Version |
Attribute_Type_Key => True,
others => False);
-- This map contains True for parameterless attributes that return a string