I've tried to read the relavent sections of standard (secs 6.5 and 6.8 of c99), but this lead me to be more confused and without a clear answer. This is the code in question:
#include <stdio.h>
#include <time.h>
int t;
#define block {\
int temp = 1; \
t = time(NULL); \
if (t == (time_t) -1 && temp) puts("turbulance ahead!");\
}
int main(){
if (((block), t%2)) {
puts("nice 'n even");
}
else {
puts("odd..");
}
return 0;
}
Is the code valid c99/c1x? It compiles on clang and gcc without producing any errors, even when -Wall and -Wextra are set.