From c171199011ac0d37df67ff99ea7286fa3455efcf Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Thu, 12 Dec 2019 10:02:32 +0000 Subject: [PATCH] [Ada] Missing error on incorrect use of Result attribute 2019-12-12 Justin Squirek gcc/ada/ * sem_attr.adb (Analyze_Attribute): Add error message for invalid usage of Attribute_Result. From-SVN: r279288 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/sem_attr.adb | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4ad9092bd3a..9e271acd00e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Justin Squirek + + * sem_attr.adb (Analyze_Attribute): Add error message for + invalid usage of Attribute_Result. + 2019-12-12 Bob Duff * sem_attr.adb (Eval_Attribute): Never mark T'Descriptor_Size as diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 0cd8e083899..e84229348f3 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -5414,6 +5414,7 @@ package body Sem_Attr is Spec_Id := Entity (P); elsif not Legal then + Error_Attr ("prefix of % attribute must be a function", P); return; end if; -- 2.30.2