aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/fe.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-03-13 12:03:47 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-26 09:29:15 +0200
commitda7b4b08f13b89752941f51651dcd5109d9be925 (patch)
tree74b6fc3355e8e72d688969d5c06a90fb7a87d010 /gcc/ada/fe.h
parent0368fc54bc11f15bfa0ed9913fd0017815dfaa5d (diff)
downloadgcc-da7b4b08f13b89752941f51651dcd5109d9be925.zip
gcc-da7b4b08f13b89752941f51651dcd5109d9be925.tar.gz
gcc-da7b4b08f13b89752941f51651dcd5109d9be925.tar.bz2
ada: Enhance Is_Null_Range and Not_Null_Range predicates
Both predicates bail out if the bounds of the range are not known at compile time, whereas Compile_Time_Compare can deal with them in specific cases. gcc/ada/ * sem_eval.ads (Is_Null_Range): Remove requirements of compile-time known bounds and add WARNING line. (Not_Null_Range): Remove requirements of compile-time known bounds. * sem_eval.adb (Is_Null_Range): Fall back to Compile_Time_Compare. (Not_Null_Range): Likewise. * fe.h (Is_Null_Range): New predicate.
Diffstat (limited to 'gcc/ada/fe.h')
-rw-r--r--gcc/ada/fe.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h
index 2d8f299..f283064 100644
--- a/gcc/ada/fe.h
+++ b/gcc/ada/fe.h
@@ -300,8 +300,10 @@ extern Boolean Is_Derived_Type (Entity_Id);
/* sem_eval: */
#define Compile_Time_Known_Value sem_eval__compile_time_known_value
+#define Is_Null_Range sem_eval__is_null_range
extern Boolean Compile_Time_Known_Value (Node_Id);
+extern Boolean Is_Null_Range (Node_Id, Node_Id);
/* sem_util: */