aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2021-09-05 11:22:52 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-04 08:45:12 +0000
commit6a53553086657d6b4668f0c3a2030ec1f63447d0 (patch)
tree2658a1092bd1d06c52e095a9d8e679ccfb49517c /gcc/ada/sem_ch6.adb
parent861dc87d7513f920365f0cf52be7406ca06711cf (diff)
[Ada] Handle properly user_defined literals given by operators.
gcc/ada/ * sem_ch6.adb (Analyze_Operator_Symbol): Recognize strings as operator names when they are the value of one of the Ada2022 aspects for User_Defined_Literals. * sem_ch13.adb (Analyze_One_Aspect): Handle an aspect value given by an Operator_Name. (Validate_Literal_Aspect): Call Analyze_Operator_Symbol when needed.
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 1fcbdfbf918..e32c4ad504c 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -2126,8 +2126,15 @@ package body Sem_Ch6 is
and then Attribute_Name (Par) /= Name_Value)
or else (Nkind (Maybe_Aspect_Spec) = N_Aspect_Specification
and then Get_Aspect_Id (Maybe_Aspect_Spec)
- -- include other aspects here ???
- in Aspect_Stable_Properties | Aspect_Aggregate)
+
+ -- Include aspects that can be specified by a
+ -- subprogram name, which can be an operator.
+
+ in Aspect_Stable_Properties
+ | Aspect_Integer_Literal
+ | Aspect_Real_Literal
+ | Aspect_String_Literal
+ | Aspect_Aggregate)
then
Find_Direct_Name (N);