for-loop-warning.slang.expected
result code = 0
standard error = {
tests/diagnostics/for-loop-warning.slang(6): warning 30502: the for loop is modifiying variable 'i' in the opposite direction from loop exit condition.
for (int i = 0; i < x; i--) // warn.
^~
tests/diagnostics/for-loop-warning.slang(10): warning 30503: the for loop is not modifiying variable 'j' because the step size evaluates to 0.
for (int j = 0; j < 3; j += 0) // warn.
^~
tests/diagnostics/for-loop-warning.slang(14): warning 30500: the for loop initializes and checks variable 'j' but the side effect expression is modifying 'i'.
for (int j = 0; j < 3; i++) // warn.
^
tests/diagnostics/for-loop-warning.slang(19): warning 30501: the for loop initializes and modifies variable 'j' but the predicate expression is checking 'i'.
for (int j = 0; i < 4; j++) // warn.
^
tests/diagnostics/for-loop-warning.slang(42): warning 30505: the loop runs for 0 iterations and will be removed.
for (int i = 1; i < 0; i++) // warn
^~~
tests/diagnostics/for-loop-warning.slang(45): warning 30505: the loop runs for 0 iterations and will be removed.
for (int i = 1; i >= 2; i--) // warn
^~~
tests/diagnostics/for-loop-warning.slang(51): warning 30505: the loop runs for 0 iterations and will be removed.
for (int i = 1; i > 1; i--) // warn
^~~
tests/diagnostics/for-loop-warning.slang(23): warning 30504: the for loop is statically determined to terminate within 3 iterations, which is less than what [MaxIters] specifies.
[MaxIters(6)] // warn
^~~~~~~~
tests/diagnostics/for-loop-warning.slang(28): warning 30504: the for loop is statically determined to terminate within 2 iterations, which is less than what [MaxIters] specifies.
[MaxIters(6)] // warn
^~~~~~~~
tests/diagnostics/for-loop-warning.slang(32): warning 30504: the for loop is statically determined to terminate within 5 iterations, which is less than what [MaxIters] specifies.
[MaxIters(6)] // warn
^~~~~~~~
}
standard output = {
}