diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-01-03 17:50:44 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-11 13:24:46 +0000 |
commit | a4c26e697b230b131c6336dc61d955c28fafa3ae (patch) | |
tree | d497ce5c2359b71d8f2fbce7bb2d6a812a870fb2 /gcc/ada | |
parent | a115e497e64731bada3b8aeab2f9444c638a145f (diff) | |
download | gcc-a4c26e697b230b131c6336dc61d955c28fafa3ae.zip gcc-a4c26e697b230b131c6336dc61d955c28fafa3ae.tar.gz gcc-a4c26e697b230b131c6336dc61d955c28fafa3ae.tar.bz2 |
[Ada] Tune inconsistent message about fixed-lower-bound and -gnatX
gcc/ada/
* par-ch3.adb (P_Array_Type_Definition): Use
Error_Msg_GNAT_Extension.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/par-ch3.adb | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 9924291..08ffd7b 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -2788,12 +2788,7 @@ package body Ch3 is else P_Index_Subtype_Def_With_Fixed_Lower_Bound (Subtype_Mark_Node); - if not Extensions_Allowed then - Error_Msg_N - ("fixed-lower-bound array is an extension feature; " - & "use -gnatX", - Token_Node); - end if; + Error_Msg_GNAT_Extension ("fixed-lower-bound array"); end if; exit when Token = Tok_Right_Paren or else Token = Tok_Of; @@ -2862,12 +2857,7 @@ package body Ch3 is P_Index_Subtype_Def_With_Fixed_Lower_Bound (Subtype_Mark_Node); - if not Extensions_Allowed then - Error_Msg_N - ("fixed-lower-bound array is an extension feature; " - & "use -gnatX", - Token_Node); - end if; + Error_Msg_GNAT_Extension ("fixed-lower-bound array"); end if; exit when Token = Tok_Right_Paren or else Token = Tok_Of; @@ -3369,12 +3359,7 @@ package body Ch3 is -- later during analysis), and scan to the next token. if Token = Tok_Box then - if not Extensions_Allowed then - Error_Msg_N - ("fixed-lower-bound array is an extension feature; " - & "use -gnatX", - Expr_Node); - end if; + Error_Msg_GNAT_Extension ("fixed-lower-bound array"); Expr_Node := Empty; Scan; |