From: Eric Botcazou Date: Sun, 10 Nov 2024 09:46:54 +0000 (+0100) Subject: ada: Rename Within_Case_Or_If_Expression predicate X-Git-Tag: basepoints/gcc-16~4103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f28c4f1df9f898f70acb244dc71f5b2cc57471b;p=thirdparty%2Fgcc.git ada: Rename Within_Case_Or_If_Expression predicate The case and if expressions are exactly the conditional expressions. gcc/ada/ChangeLog: * exp_util.ads (Within_Case_Or_If_Expression): Rename into... (Within_Conditional_Expression): ...this. * exp_util.adb (Within_Case_Or_If_Expression): Rename into... (Within_Conditional_Expression): ...this. * checks.adb (Install_Null_Excluding_Check): Adjust for renaming. --- diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8a3c4e8b4bfb..1ec49924c9be 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -8427,7 +8427,7 @@ package body Checks is -- where the expression might not be evaluated, and the warning -- appear as extraneous noise. - and then not Within_Case_Or_If_Expression (N) + and then not Within_Conditional_Expression (N) then Apply_Compile_Time_Constraint_Error (N, "null value not allowed here??", CE_Access_Check_Failed); diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index e4397fe868d7..149be620b1b4 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6702,7 +6702,7 @@ package body Exp_Util is -- then we need to insert at the appropriate (inner) location in -- the not as an action on Node_To_Be_Wrapped. - In_Cond_Expr : constant Boolean := Within_Case_Or_If_Expression (N); + In_Cond_Expr : constant Boolean := Within_Conditional_Expression (N); begin -- When the node is inside a case/if expression, the lifetime of any @@ -14632,11 +14632,11 @@ package body Exp_Util is Map_Types (Parent_Type, Derived_Type); end Update_Primitives_Mapping; - ---------------------------------- - -- Within_Case_Or_If_Expression -- - ---------------------------------- + ----------------------------------- + -- Within_Conditional_Expression -- + ----------------------------------- - function Within_Case_Or_If_Expression (N : Node_Id) return Boolean is + function Within_Conditional_Expression (N : Node_Id) return Boolean is Nod : Node_Id; Par : Node_Id; @@ -14680,7 +14680,7 @@ package body Exp_Util is end loop; return False; - end Within_Case_Or_If_Expression; + end Within_Conditional_Expression; ------------------------------ -- Predicate_Check_In_Scope -- diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 0872db214911..751fb5b31e08 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -1283,11 +1283,11 @@ package Exp_Util is -- when elaborating a contract for a subprogram, and when freezing a type -- extension to verify legality rules on inherited conditions. - function Within_Case_Or_If_Expression (N : Node_Id) return Boolean; + function Within_Conditional_Expression (N : Node_Id) return Boolean; -- Determine whether arbitrary node N is immediately within a dependent - -- expression of a case or an if expression. The criterion is whether + -- expression of a conditional expression. The criterion is whether -- temporaries created by the actions attached to N need to outlive an - -- enclosing case or if expression. + -- enclosing conditional expression. private pragma Inline (Duplicate_Subexpr);