]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Do not generate incorrect warning about redundant type conversion
authorSteve Baird <baird@adacore.com>
Mon, 16 Jun 2025 23:46:13 +0000 (16:46 -0700)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 4 Jul 2025 07:41:47 +0000 (09:41 +0200)
commit37ee107ddd833fd149f10af98259d75d6002da0a
tree365299fa4f8bccfd6cd1d5c0eac8d16e5fd61f9e
parent623ce60ee6e06c76cb2abb376af21bf7fd51874c
ada: Do not generate incorrect warning about redundant type conversion

If -gnatwr is enabled, then in some cases a type conversion between two
different Boolean types incorrectly results in a warning that the conversion
is redundant.

gcc/ada/ChangeLog:

* sem_res.adb (Resolve_Type_Conversion): Replace code for
detecting a similar case with a more comprehensive test.
gcc/ada/sem_res.adb