op3.c
//#include <stdio.h>
#define PRINTX printf("%d\n",x)
// ↓int main()↓
main()
{
int x=2, y, z;
x *= 3 + 2; PRINTX;
x *= y = z = 4; PRINTX;
x = y == z; PRINTX;
x == ( y = z ); PRINTX;
}
bash
/*
op2.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
6 | main()
| ^~~~
op2.c: In function ‘main’:
op2.c:3:16: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
3 | #define PRINTX printf("%d\n",x)
| ^~~~~~
op2.c:10:21: note: in expansion of macro ‘PRINTX’
10 | x *= 3 + 2; PRINTX;
| ^~~~~~
op2.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | //#include <stdio.h>
op2.c:3:16: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
3 | #define PRINTX printf("%d\n",x)
| ^~~~~~
op2.c:10:21: note: in expansion of macro ‘PRINTX’
10 | x *= 3 + 2; PRINTX;
| ^~~~~~
op2.c:3:16: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
3 | #define PRINTX printf("%d\n",x)
| ^~~~~~
op2.c:10:21: note: in expansion of macro ‘PRINTX’
10 | x *= 3 + 2; PRINTX;
| ^~~~~~
*/