aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-22 13:58:27 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-22 13:58:27 +0000
commitad277369b236a39fff13c87a51a8e67f7562a80a (patch)
treec1024ac2b531153bfb6a22989c8d9ff4e3dcfa63 /libiberty
parenta211917585ca978a84123c4c934f2f68bb545bcd (diff)
downloadgcc-ad277369b236a39fff13c87a51a8e67f7562a80a.zip
gcc-ad277369b236a39fff13c87a51a8e67f7562a80a.tar.gz
gcc-ad277369b236a39fff13c87a51a8e67f7562a80a.tar.bz2
[Ada] Remove misleading warning/suggestion in membership test
This patch removes a warning on a membership test whose right operand is given by a range. In many cases the check can be replaced by the use of attribute 'Valid, but if the bounds of range are type conversion this replacement would be invorrect and the warning and suggestion are misleading. 2019-07-22 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_N_In): Do not suggest the use of attribute 'Valid as a replacement for a range check on a discrete type when the bounds of the range are given by type conversions, because in such a case there are distinct types involved and the subbested attribute replacement would be misplaced. gcc/testsuite/ * gnat.dg/warn26.adb: New testcase. From-SVN: r273694
Diffstat (limited to 'libiberty')
0 files changed, 0 insertions, 0 deletions