I tried the following piece of code in C, it is clearly wrong:
#include <stdio.h>
int main(void)
{
int i = 0;
for (i = 0; i < 20; ++i)
{
if (10 < i < 15) // It should be ((10 < i) && (i < 15))
{
printf("## @ i = %d\n", i);
}
}
return 0;
}
Its result is:
## @ i = 0
## @ i = 1
## @ i = 2
## @ i = 3
## @ i = 4
## @ i = 5
## @ i = 6
## @ i = 7
## @ i = 8
## @ i = 9
## @ i = 10
## @ i = 11
## @ i = 12
## @ i = 13
## @ i = 14
## @ i = 15
## @ i = 16
## @ i = 17
## @ i = 18
## @ i = 19
No errors produced by gcc compiler. The result of the if condition is always true.
Why that?