[4.5, Fortran, Patch] PR 38432 - Add warning for loops which are never executed
Sun Dec 7 14:41:00 GMT 2008
the patch adds a warning for loops which have zero iterations, e.g.
do i = 1, 0
! never reached
(/ i, i=1,2,-1 /) ! Empty array
The question is whether the warning should be printed always (like
currently) or only with -W* (-Wsurprising)? For normal loops there are
nearly alway not intended; for array constructors they can be used on
purpose to construct zero-sized arrays; I don't think that happens often
with real-world code, but some (few) programs could have a lot of those.
Build and tested on x86-64-linux.
OK for 4.5?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gcc-patches