[Ada] Improve warnings about infinite loops
Pierre-Marie de Rodat
derodat@adacore.com
Wed Jul 3 08:30:00 GMT 2019
The compiler now has fewer false alarms when warning about infinite
loops. For example, a loop of the form "for X of A ...", where A is an
array, cannot be infinite. The compiler no longer warns in this case.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-07-03 Bob Duff <duff@adacore.com>
gcc/ada/
* sem_warn.adb (Check_Infinite_Loop_Warning): Avoid the warning
if an Iterator_Specification is present.
gcc/testsuite/
* gnat.dg/warn20.adb, gnat.dg/warn20_pkg.adb,
gnat.dg/warn20_pkg.ads: New testcase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1778 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190703/a4f3cb80/attachment.bin>
More information about the Gcc-patches
mailing list