aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/fe.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2022-04-29 08:08:58 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2022-06-01 08:43:15 +0000
commit3cd52053f80846df2ea22e3fff059ebc094e649b (patch)
tree11051597b326f842e119d7f9f28d5c81622f87b1 /gcc/ada/fe.h
parentae575e93b6f7fb7077940cb7410f899da184ec2d (diff)
downloadgcc-3cd52053f80846df2ea22e3fff059ebc094e649b.zip
gcc-3cd52053f80846df2ea22e3fff059ebc094e649b.tar.gz
gcc-3cd52053f80846df2ea22e3fff059ebc094e649b.tar.bz2
[Ada] Suppress warnings on membership test of ranges
For a membership test "X in A .. B", the compiler used to warn if it could prove that X is within one of the bounds. For example, if we know at compile time that X >= A, then the above could be replaced by "X <= B". This patch suppresses that warning, because there is really nothing wrong with the membership test, and programmers sometimes find it annoying. gcc/ada/ * exp_ch4.adb (Expand_N_In): Do not warn in the above-mentioned cases. * fe.h (Assume_No_Invalid_Values): Remove from fe.h, because this is not used in gigi. * opt.ads (Assume_No_Invalid_Values): Improve the comment. We don't need to "clearly prove"; we can just "prove". Remove the comment about fe.h, which is no longer true.
Diffstat (limited to 'gcc/ada/fe.h')
-rw-r--r--gcc/ada/fe.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h
index bfd9054..1048465 100644
--- a/gcc/ada/fe.h
+++ b/gcc/ada/fe.h
@@ -203,7 +203,6 @@ extern Boolean In_Extended_Main_Code_Unit (Entity_Id);
/* opt: */
#define Ada_Version opt__ada_version
-#define Assume_No_Invalid_Values opt__assume_no_invalid_values
#define Back_End_Inlining opt__back_end_inlining
#define Debug_Generated_Code opt__debug_generated_code
#define Enable_128bit_Types opt__enable_128bit_types
@@ -220,7 +219,6 @@ typedef enum {
} Ada_Version_Type;
extern Ada_Version_Type Ada_Version;
-extern Boolean Assume_No_Invalid_Values;
extern Boolean Back_End_Inlining;
extern Boolean Debug_Generated_Code;
extern Boolean Enable_128bit_Types;