diff options
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index f75f1f7..28c5f17 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -5848,9 +5848,12 @@ package body Sem_Prag is -- For Ada 2022, pre/postconditions can appear on formal subprograms elsif Nkind (Subp_Decl) = N_Formal_Concrete_Subprogram_Declaration - and then Ada_Version >= Ada_2022 then - null; + if Ada_Version < Ada_2022 then + Error_Msg_Ada_2022_Feature + ("pre/postcondition on formal subprogram", Loc); + raise Pragma_Exit; + end if; -- An access-to-subprogram type can have pre/postconditions, which -- are both analyzed when attached to the type and copied to the @@ -12684,7 +12687,11 @@ package body Sem_Prag is -- Deal with unrecognized pragma - if not Is_Pragma_Name (Pname) then + -- Pragma Unsigned_Base_Range temporarily disabled + + if not Is_Pragma_Name (Pname) + or else Pname = Name_Unsigned_Base_Range + then declare Msg_Issued : Boolean := False; begin |