This change removes a historical flag that is not used anymore. No behaviour change, no test.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Thomas Quinot <qui...@adacore.com> * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled): This flag of N_Pragma nodes is not used, remove it as well as all of the associated circuitry.
Index: sinfo.adb =================================================================== --- sinfo.adb (revision 177337) +++ sinfo.adb (working copy) @@ -2406,14 +2406,6 @@ return List2 (N); end Pragma_Argument_Associations; - function Pragma_Enabled - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Pragma); - return Flag5 (N); - end Pragma_Enabled; - function Pragma_Identifier (N : Node_Id) return Node_Id is begin @@ -5440,14 +5432,6 @@ Set_List2_With_Parent (N, Val); end Set_Pragma_Argument_Associations; - procedure Set_Pragma_Enabled - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Pragma); - Set_Flag5 (N, Val); - end Set_Pragma_Enabled; - procedure Set_Pragma_Identifier (N : Node_Id; Val : Node_Id) is begin Index: sinfo.ads =================================================================== --- sinfo.ads (revision 177337) +++ sinfo.ads (working copy) @@ -1587,12 +1587,6 @@ -- package specification. This field is Empty for library bodies (the -- parent spec in this case can be found from the corresponding spec). - -- Pragma_Enabled (Flag5-Sem) - -- Present in N_Pragma nodes. This flag is relevant only for pragmas - -- Assert, Check, Precondition, and Postcondition. It is true if the - -- check corresponding to the pragma type is enabled at the point where - -- the pragma appears. - -- Present_Expr (Uint3-Sem) -- Present in an N_Variant node. This has a meaningful value only after -- Gigi has back annotated the tree with representation information. At @@ -2062,7 +2056,6 @@ -- Pragma_Argument_Associations (List2) (set to No_List if none) -- Pragma_Identifier (Node4) -- Next_Rep_Item (Node5-Sem) - -- Pragma_Enabled (Flag5-Sem) -- From_Aspect_Specification (Flag13-Sem) -- Is_Delayed_Aspect (Flag14-Sem) -- Import_Interface_Present (Flag16-Sem) @@ -8734,9 +8727,6 @@ function Pragma_Argument_Associations (N : Node_Id) return List_Id; -- List2 - function Pragma_Enabled - (N : Node_Id) return Boolean; -- Flag5 - function Pragma_Identifier (N : Node_Id) return Node_Id; -- Node4 @@ -9700,9 +9690,6 @@ procedure Set_Pragma_Argument_Associations (N : Node_Id; Val : List_Id); -- List2 - procedure Set_Pragma_Enabled - (N : Node_Id; Val : Boolean := True); -- Flag5 - procedure Set_Pragma_Identifier (N : Node_Id; Val : Node_Id); -- Node4 @@ -11897,7 +11884,6 @@ pragma Inline (Parent_Spec); pragma Inline (Position); pragma Inline (Pragma_Argument_Associations); - pragma Inline (Pragma_Enabled); pragma Inline (Pragma_Identifier); pragma Inline (Pragmas_After); pragma Inline (Pragmas_Before); @@ -12216,7 +12202,6 @@ pragma Inline (Set_Parent_Spec); pragma Inline (Set_Position); pragma Inline (Set_Pragma_Argument_Associations); - pragma Inline (Set_Pragma_Enabled); pragma Inline (Set_Pragma_Identifier); pragma Inline (Set_Pragmas_After); pragma Inline (Set_Pragmas_Before); Index: sem_prag.adb =================================================================== --- sem_prag.adb (revision 177347) +++ sem_prag.adb (working copy) @@ -1719,7 +1719,6 @@ -- Record if pragma is enabled if Check_Enabled (Pname) then - Set_Pragma_Enabled (N); Set_SCO_Pragma_Enabled (Loc); end if; @@ -6695,8 +6694,6 @@ Check_On := Check_Enabled (Chars (Get_Pragma_Arg (Arg1))); if Check_On then - Set_Pragma_Enabled (N); - Set_Pragma_Enabled (Original_Node (N)); Set_SCO_Pragma_Enabled (Loc); end if; Index: sem_ch12.adb =================================================================== --- sem_ch12.adb (revision 177274) +++ sem_ch12.adb (working copy) @@ -12446,26 +12446,6 @@ -- All other cases than aggregates else - -- For pragmas, we propagate the Enabled status for the - -- relevant pragmas to the original generic tree. This was - -- originally needed for SCO generation. It is no longer - -- needed there (since we use the Sloc value in calls to - -- Set_SCO_Pragma_Enabled), but it seems a generally good - -- idea to have this flag set properly. - - if Nkind (N) = N_Pragma - and then - (Pragma_Name (N) = Name_Assert or else - Pragma_Name (N) = Name_Check or else - Pragma_Name (N) = Name_Precondition or else - Pragma_Name (N) = Name_Postcondition) - and then Present (Associated_Node (Pragma_Identifier (N))) - then - Set_Pragma_Enabled (N, - Pragma_Enabled - (Parent (Associated_Node (Pragma_Identifier (N))))); - end if; - Save_Global_Descendant (Field1 (N)); Save_Global_Descendant (Field2 (N)); Save_Global_Descendant (Field3 (N));