aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-prag.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2024-05-24 14:14:03 -0700
committerMarc Poulhiès <poulhies@adacore.com>2024-06-20 10:50:57 +0200
commit36bd57330f9b8f06206c909af53cd8b3ca6f6bed (patch)
treec08652c0fd338691d3c172c53e56fd1aaf15c40d /gcc/ada/par-prag.adb
parentecb84b0aa4eac2050eedd7f9a66dd7393d5d31c2 (diff)
downloadgcc-36bd57330f9b8f06206c909af53cd8b3ca6f6bed.zip
gcc-36bd57330f9b8f06206c909af53cd8b3ca6f6bed.tar.gz
gcc-36bd57330f9b8f06206c909af53cd8b3ca6f6bed.tar.bz2
ada: Replace "All" argument to Extensions_Allowed pragma with "All_Extensions"
The argument to pragma Extensions_Allowed to enable all extensions is no longer "All", but instead "All_Extensions". gcc/ada/ * doc/gnat_rm/gnat_language_extensions.rst: Update documentation. * doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation. * errout.adb (Error_Msg_GNAT_Extension): Update error message text. * par-prag.adb: Update pragma parsing. This includes changing the the name of the Check_Arg_Is_On_Or_Off formal parameter All_OK_Too to All_Extensions_OK_Too. * sem_prag.adb (Analyze_Pragma): In analyzing an Extensions_Allowed pragma, replace uses of Name_All with Name_All_Extensions; update a comment to reflect this. * snames.ads-tmpl: Add Name_All_Extensions declaration. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/par-prag.adb')
-rw-r--r--gcc/ada/par-prag.adb19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb
index 88a0439..9e77bf1 100644
--- a/gcc/ada/par-prag.adb
+++ b/gcc/ada/par-prag.adb
@@ -74,11 +74,11 @@ function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is
-- is a string literal. If not give error and raise Error_Resync.
procedure Check_Arg_Is_On_Or_Off
- (Arg : Node_Id; All_OK_Too : Boolean := False);
+ (Arg : Node_Id; All_Extensions_OK_Too : Boolean := False);
-- Check the expression of the specified argument to make sure that it
-- is an identifier which is either ON or OFF, and if not, then issue
- -- an error message and raise Error_Resync. If All_OK_Too is True,
- -- then an ALL identifer is also acceptable.
+ -- an error message and raise Error_Resync. If All_Extensions_OK_Too is
+ -- True, then an ALL_EXTENSIONS identifer is also acceptable.
procedure Check_No_Identifier (Arg : Node_Id);
-- Checks that the given argument does not have an identifier. If
@@ -170,21 +170,22 @@ function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is
----------------------------
procedure Check_Arg_Is_On_Or_Off
- (Arg : Node_Id; All_OK_Too : Boolean := False)
+ (Arg : Node_Id; All_Extensions_OK_Too : Boolean := False)
is
Argx : constant Node_Id := Expression (Arg);
Error : Boolean := Nkind (Expression (Arg)) /= N_Identifier;
begin
if not Error then
Error := Chars (Argx) not in Name_On | Name_Off
- and then not (All_OK_Too and Chars (Argx) = Name_All);
+ and then not (All_Extensions_OK_Too
+ and then Chars (Argx) = Name_All_Extensions);
end if;
if Error then
Error_Msg_Name_2 := Name_On;
Error_Msg_Name_3 := Name_Off;
- if All_OK_Too then
- Error_Msg_Name_4 := Name_All;
+ if All_Extensions_OK_Too then
+ Error_Msg_Name_4 := Name_All_Extensions;
Error_Msg_N ("argument for pragma% must be% or% or%", Argx);
else
Error_Msg_N ("argument for pragma% must be% or%", Argx);
@@ -433,11 +434,11 @@ begin
when Pragma_Extensions_Allowed =>
Check_Arg_Count (1);
Check_No_Identifier (Arg1);
- Check_Arg_Is_On_Or_Off (Arg1, All_OK_Too => True);
+ Check_Arg_Is_On_Or_Off (Arg1, All_Extensions_OK_Too => True);
if Chars (Expression (Arg1)) = Name_On then
Ada_Version := Ada_With_Core_Extensions;
- elsif Chars (Expression (Arg1)) = Name_All then
+ elsif Chars (Expression (Arg1)) = Name_All_Extensions then
Ada_Version := Ada_With_All_Extensions;
else
Ada_Version := Ada_Version_Explicit;