A
August Karlstrom
Hi,
Can someone explain the reason for the warning from GCC below:
<shell-session>
$ cat test.c
#include <stdbool.h>
bool a, b, c, d;
int x, y, z, u;
int main(void)
{
d = a || b && c;
u = x + y * z;
return 0;
}
$ gcc -Wall test.c
test.c: In function ‘main’:
test.c:8: warning: suggest parentheses around && within ||
</shell-session>
For sake of consistency, why not suggest parentheses around `y * z' as
well? (which would be absurd)
August
Can someone explain the reason for the warning from GCC below:
<shell-session>
$ cat test.c
#include <stdbool.h>
bool a, b, c, d;
int x, y, z, u;
int main(void)
{
d = a || b && c;
u = x + y * z;
return 0;
}
$ gcc -Wall test.c
test.c: In function ‘main’:
test.c:8: warning: suggest parentheses around && within ||
</shell-session>
For sake of consistency, why not suggest parentheses around `y * z' as
well? (which would be absurd)
August