diff options
author | Jose Ruiz <ruiz@adacore.com> | 2024-03-07 19:16:18 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-20 09:47:03 +0200 |
commit | d6a10f8173ca9f390cd87691477fa147d4404f3b (patch) | |
tree | 758f4bed6a99a74d05515b7602baf0233e2fb550 /gcc | |
parent | bf941670685fd8d646ae8955c3bb086d1512bac2 (diff) | |
download | gcc-d6a10f8173ca9f390cd87691477fa147d4404f3b.zip gcc-d6a10f8173ca9f390cd87691477fa147d4404f3b.tar.gz gcc-d6a10f8173ca9f390cd87691477fa147d4404f3b.tar.bz2 |
ada: Detect only conflict with synomyms of max queue length
Use of duplicated representation aspect is detected elsewhere
so we do not try to detect them here to avoid repetition of
messages.
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Exclude detection of duplicates
because they are detected elsewhere.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_prag.adb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0e2ce9d..a895fd2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -20388,15 +20388,23 @@ package body Sem_Prag is ("pragma % must apply to a protected entry declaration"); end if; - -- Check for duplicates + -- Check for conflicting use of synonyms. Note that we exclude + -- the detection of duplicates here because they are detected + -- elsewhere. - if Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Length) + if (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Length) + and then + Prag_Id /= Pragma_Max_Entry_Queue_Length) or else - Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) + (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) + and then + Prag_Id /= Pragma_Max_Entry_Queue_Depth) or else - Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) + (Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) + and then + Prag_Id /= Pragma_Max_Queue_Length) then - Error_Msg_N ("??duplicate Max_Entry_Queue_Length pragma", N); + Error_Msg_N ("??maximum entry queue length already set", N); end if; -- Mark the pragma as Ghost if the related subprogram is also |