Closed
Description
Recently introduced by @mordante's #98169.
MSVC's /analyze
complains:
D:\GitHub\STL\llvm-project\libcxx\test\std\time\time.cal\time.cal.ymdlast\time.cal.ymdlast.nonmembers\comparisons.pass.cpp(62) : warning C6294: Ill-defined for-loop. Loop body not executed.
D:\GitHub\STL\llvm-project\libcxx\test\std\time\time.cal\time.cal.ymdlast\time.cal.ymdlast.nonmembers\comparisons.pass.cpp(63) : warning C6294: Ill-defined for-loop. Loop body not executed.
This warning is usually a nuisance (complaining about loops that intentionally perform no iterations; calling them "ill-defined" isn't great either), but in this case it found actually-squirrely code 🐿️ :
I'm not sure what this code was intended to be doing. It appears that "same month, different years" previously looped from 1000 to 2000. Perhaps 1000 * 1000 = 1 million nested iterations was excessive, and the code should be looping from (say) 1000 to 1020?