Pelles C forum
Pelles C => General discussions => Topic started by: Alessio on August 09, 2005, 05:42:44 PM
-
Hi, I was wonder why this code
#include <stdio.h>
int main(void) {
int i;
i , 2;
return 0;
}
do not generate a warning until I set compiler level warnings to 2.
I'm just damn curious!
I've spent a day to found a bug in my code...from now I'll set compiler level warnings to 2 on every project.
Thank you.
-
It's an example of the comma operator, which is perfectly valid. Maybe "Expression with no effect removed" should be at level 1, but I'm not completely sure it's a good thing.
Pelle