diff options
author | Bob Duff <duff@adacore.com> | 2022-04-29 08:08:58 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-06-01 08:43:15 +0000 |
commit | 3cd52053f80846df2ea22e3fff059ebc094e649b (patch) | |
tree | 11051597b326f842e119d7f9f28d5c81622f87b1 /gcc/value-range.h | |
parent | ae575e93b6f7fb7077940cb7410f899da184ec2d (diff) | |
download | gcc-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/value-range.h')
0 files changed, 0 insertions, 0 deletions