From: Eric Botcazou <ebotca...@adacore.com>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/checks.adb   |  2 +-
 gcc/ada/exp_util.adb | 12 ++++++------
 gcc/ada/exp_util.ads |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 8a3c4e8b4bf..1ec49924c9b 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 e4397fe868d..149be620b1b 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 0872db21491..751fb5b31e0 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);
-- 
2.43.0

Reply via email to