diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-12-09 14:34:45 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-04-28 05:38:11 -0400 |
commit | 12e67086ad2777e1f583124f15210ee0323533c3 (patch) | |
tree | 75f3d96b145c0f176aeb5df0f60d81794b91c666 | |
parent | 43d5138227078bf9fca4f9b40074609cf51f8e69 (diff) | |
download | gcc-12e67086ad2777e1f583124f15210ee0323533c3.zip gcc-12e67086ad2777e1f583124f15210ee0323533c3.tar.gz gcc-12e67086ad2777e1f583124f15210ee0323533c3.tar.bz2 |
[Ada] More precise error about aspects conflicting with Static
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Static): Use aspect name in the
error message.
-rw-r--r-- | gcc/ada/sem_ch13.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 07dec4c..2273887 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2594,8 +2594,9 @@ package body Sem_Ch13 is for Asp in Pre_Post_Aspects loop if Has_Aspect (E, Asp) then + Error_Msg_Name_1 := Aspect_Names (Asp); Error_Msg_N - ("this aspect is not allowed for a static " + ("aspect % is not allowed for a static " & "expression function", Find_Aspect (E, Asp)); |