Of course, a decent compiler helps you out:
Code:itsme@dreams:~/C$ cat wrongop.c
int main(void)
{
int a;
if(a = 10)
;
return 0;
}
itsme@dreams:~/C$ gcc -Wall wrongop.c -o wrongop
wrongop.c: In function `main':
wrongop.c:5: warning: suggest parentheses around assignment used as truth value
itsme@dreams:~/C$