0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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;
      |                     ^~~~~~
*/
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?