From: Bob Duff <[email protected]>
Initialize aspect is implementation defined, but was not in
Implementation_Defined_Aspect.
Misc minor comment fixes.
gcc/ada/ChangeLog:
* aspects.ads (Aspect_Initialize):
Add to Implementation_Defined_Aspect.
* einfo.ads (Alignment_Clause): Minor comment fix.
* sem.adb: Remove useless null statements.
* sem_ch13.ads (Rep_Item_Too_Late):
Minor comment fix (this IS Sem_Ch13).
* sem_prag.adb (Fix_Error):
Minor comment fix (aspects are not "abnormal").
* sinfo.ads: Minor comment fix.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/aspects.ads | 159 ++++++++++++++++++++++---------------------
gcc/ada/einfo.ads | 2 +-
gcc/ada/sem.adb | 2 -
gcc/ada/sem_ch13.ads | 2 +-
gcc/ada/sem_prag.adb | 6 +-
gcc/ada/sinfo.ads | 2 +-
6 files changed, 86 insertions(+), 87 deletions(-)
diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads
index c7d73b1b2b5..f1721bead62 100644
--- a/gcc/ada/aspects.ads
+++ b/gcc/ada/aspects.ads
@@ -289,86 +289,87 @@ package Aspects is
-- The following array identifies all implementation defined aspects
Implementation_Defined_Aspect : constant array (Aspect_Id) of Boolean :=
- (Aspect_Abstract_State => True,
- Aspect_Always_Terminates => True,
- Aspect_Annotate => True,
- Aspect_Async_Readers => True,
- Aspect_Async_Writers => True,
- Aspect_Constant_After_Elaboration => True,
- Aspect_Contract_Cases => True,
- Aspect_CUDA_Device => True,
- Aspect_CUDA_Global => True,
- Aspect_Depends => True,
- Aspect_Designated_Storage_Model => True,
- Aspect_Dimension => True,
- Aspect_Dimension_System => True,
- Aspect_Disable_Controlled => True,
- Aspect_Effective_Reads => True,
- Aspect_Effective_Writes => True,
- Aspect_Exceptional_Cases => True,
- Aspect_Exit_Cases => True,
- Aspect_Extended_Access => True,
- Aspect_Extensions_Visible => True,
- Aspect_External_Initialization => True,
- Aspect_Favor_Top_Level => True,
- Aspect_Finalizable => True,
+ (Aspect_Abstract_State => True,
+ Aspect_Always_Terminates => True,
+ Aspect_Annotate => True,
+ Aspect_Async_Readers => True,
+ Aspect_Async_Writers => True,
+ Aspect_Constant_After_Elaboration => True,
+ Aspect_Contract_Cases => True,
+ Aspect_CUDA_Device => True,
+ Aspect_CUDA_Global => True,
+ Aspect_Depends => True,
+ Aspect_Designated_Storage_Model => True,
+ Aspect_Dimension => True,
+ Aspect_Dimension_System => True,
+ Aspect_Disable_Controlled => True,
+ Aspect_Effective_Reads => True,
+ Aspect_Effective_Writes => True,
+ Aspect_Exceptional_Cases => True,
+ Aspect_Exit_Cases => True,
+ Aspect_Extended_Access => True,
+ Aspect_Extensions_Visible => True,
+ Aspect_External_Initialization => True,
+ Aspect_Favor_Top_Level => True,
+ Aspect_Finalizable => True,
Aspect_First_Controlling_Parameter => True,
- Aspect_Ghost => True,
- Aspect_Ghost_Predicate => True,
- Aspect_Global => True,
- Aspect_GNAT_Annotate => True,
- Aspect_Initial_Condition => True,
- Aspect_Initializes => True,
- Aspect_Inline_Always => True,
- Aspect_Invariant => True,
- Aspect_Iterable => True,
- Aspect_Linker_Section => True,
- Aspect_Local_Restrictions => True,
- Aspect_Lock_Free => True,
- Aspect_Max_Queue_Length => True,
- Aspect_No_Caching => True,
- Aspect_No_Elaboration_Code_All => True,
- Aspect_No_Inline => True,
- Aspect_No_Raise => True,
- Aspect_No_Tagged_Streams => True,
- Aspect_No_Task_Parts => True,
- Aspect_Obsolescent => True,
- Aspect_Part_Of => True,
- Aspect_Persistent_BSS => True,
- Aspect_Potentially_Invalid => True,
- Aspect_Predicate => True,
- Aspect_Pure_Function => True,
- Aspect_Refined_Depends => True,
- Aspect_Refined_Global => True,
- Aspect_Refined_Post => True,
- Aspect_Refined_State => True,
- Aspect_Relaxed_Initialization => True,
- Aspect_Remote_Access_Type => True,
- Aspect_Scalar_Storage_Order => True,
- Aspect_Secondary_Stack_Size => True,
- Aspect_Shared => True,
- Aspect_Side_Effects => True,
- Aspect_Simple_Storage_Pool => True,
- Aspect_Simple_Storage_Pool_Type => True,
- Aspect_SPARK_Mode => True,
- Aspect_Storage_Model_Type => True,
- Aspect_Subprogram_Variant => True,
- Aspect_Suppress_Debug_Info => True,
- Aspect_Suppress_Initialization => True,
- Aspect_Test_Case => True,
- Aspect_Thread_Local_Storage => True,
- Aspect_Universal_Aliasing => True,
- Aspect_Unmodified => True,
- Aspect_Unreferenced => True,
- Aspect_Unreferenced_Objects => True,
- Aspect_Unsigned_Base_Range => True,
- Aspect_User_Aspect => True,
- Aspect_Value_Size => True,
- Aspect_Volatile_Full_Access => True,
- Aspect_Volatile_Function => True,
- Aspect_Warnings => True,
- Ignored_Aspects => True,
- others => False);
+ Aspect_Ghost => True,
+ Aspect_Ghost_Predicate => True,
+ Aspect_Global => True,
+ Aspect_GNAT_Annotate => True,
+ Aspect_Initial_Condition => True,
+ Aspect_Initialize => True,
+ Aspect_Initializes => True,
+ Aspect_Inline_Always => True,
+ Aspect_Invariant => True,
+ Aspect_Iterable => True,
+ Aspect_Linker_Section => True,
+ Aspect_Local_Restrictions => True,
+ Aspect_Lock_Free => True,
+ Aspect_Max_Queue_Length => True,
+ Aspect_No_Caching => True,
+ Aspect_No_Elaboration_Code_All => True,
+ Aspect_No_Inline => True,
+ Aspect_No_Raise => True,
+ Aspect_No_Tagged_Streams => True,
+ Aspect_No_Task_Parts => True,
+ Aspect_Obsolescent => True,
+ Aspect_Part_Of => True,
+ Aspect_Persistent_BSS => True,
+ Aspect_Potentially_Invalid => True,
+ Aspect_Predicate => True,
+ Aspect_Pure_Function => True,
+ Aspect_Refined_Depends => True,
+ Aspect_Refined_Global => True,
+ Aspect_Refined_Post => True,
+ Aspect_Refined_State => True,
+ Aspect_Relaxed_Initialization => True,
+ Aspect_Remote_Access_Type => True,
+ Aspect_Scalar_Storage_Order => True,
+ Aspect_Secondary_Stack_Size => True,
+ Aspect_Shared => True,
+ Aspect_Side_Effects => True,
+ Aspect_Simple_Storage_Pool => True,
+ Aspect_Simple_Storage_Pool_Type => True,
+ Aspect_SPARK_Mode => True,
+ Aspect_Storage_Model_Type => True,
+ Aspect_Subprogram_Variant => True,
+ Aspect_Suppress_Debug_Info => True,
+ Aspect_Suppress_Initialization => True,
+ Aspect_Test_Case => True,
+ Aspect_Thread_Local_Storage => True,
+ Aspect_Universal_Aliasing => True,
+ Aspect_Unmodified => True,
+ Aspect_Unreferenced => True,
+ Aspect_Unreferenced_Objects => True,
+ Aspect_Unsigned_Base_Range => True,
+ Aspect_User_Aspect => True,
+ Aspect_Value_Size => True,
+ Aspect_Volatile_Full_Access => True,
+ Aspect_Volatile_Function => True,
+ Aspect_Warnings => True,
+ Ignored_Aspects => True,
+ others => False);
-- end Implementation_Defined_Aspect
-- The following array indicates aspects that specify operational
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index c908542e3e7..b1ec7f885e7 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -430,7 +430,7 @@ package Einfo is
-- Alignment_Clause (synthesized)
-- Applies to all entities for types and objects. If an alignment
-- attribute definition clause is present for the entity, then this
--- function returns the N_Attribute_Definition clause that specifies the
+-- function returns the N_Attribute_Definition_Clause that specifies the
-- alignment. If no alignment clause applies to the type, then the call
-- to this function returns Empty. Note that the call can return a
-- non-Empty value even if Has_Alignment_Clause is not set (happens with
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index e3dde621663..6679c1d3bf2 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -651,7 +651,6 @@ package body Sem is
when N_Empty =>
pragma Assert (Serious_Errors_Detected /= 0
or else Configurable_Run_Time_Violations /= 0);
- null;
-- A call to analyze the error node is simply ignored, to avoid
-- causing cascaded errors (happens of course only in error cases)
@@ -660,7 +659,6 @@ package body Sem is
when N_Error =>
Expander_Mode_Save_And_Set (False);
- null;
-- Push/Pop nodes normally don't come through an analyze call. An
-- exception is the dummy ones bracketing a subprogram body. In any
diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads
index 7454600a4cc..63f72004e0a 100644
--- a/gcc/ada/sem_ch13.ads
+++ b/gcc/ada/sem_ch13.ads
@@ -229,7 +229,7 @@ package Sem_Ch13 is
-- Note: Calls to Rep_Item_Too_Late are ignored for the case of attribute
-- definition clauses which have From_Aspect_Specification set. This is
-- because such clauses are linked on to the Rep_Item chain in procedure
- -- Sem_Ch13.Analyze_Aspect_Specifications. See that procedure for details.
+ -- Analyze_Aspect_Specifications. See that procedure for details.
procedure Validate_Unchecked_Conversion
(N : Node_Id;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index e891591a65b..3519f9166e6 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -5222,9 +5222,9 @@ package body Sem_Prag is
-- errors out and uses Arg as the pragma argument for the message.
function Fix_Error (Msg : String) return String;
- -- This is called prior to issuing an error message. Msg is the normal
- -- error message issued in the pragma case. This routine checks for the
- -- case of a pragma coming from an aspect in the source, and returns a
+ -- This is called prior to issuing an error message. Msg is the error
+ -- message issued in the pragma case. This routine checks for the case
+ -- of a pragma coming from an aspect in the source, and returns a
-- message suitable for the aspect case as follows:
--
-- Each substring "pragma" is replaced by "aspect"
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 477f4bc312d..3c509bae39d 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -900,7 +900,7 @@ package Sinfo is
-- additional cleanup actions carried over from the transient scope.
-- Check_Address_Alignment
- -- A flag present in N_Attribute_Definition clause for a 'Address
+ -- A flag present in N_Attribute_Definition_Clause for a 'Address
-- attribute definition. This flag is set if a dynamic check should be
-- generated at the freeze point for the entity to which this address
-- clause applies. The reason that we need this flag is that we want to
--
2.53.0