Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat a.c
- #include <stdio.h>
- int main()
- {
- int q = 1;
- q = q++ + ++q * --q - q--;
- printf("a = %d\n", q);
- return 0;
- }
- $ gcc-9 a.c
- $ ./a.out
- a = 3
- $ clang a.c
- a.c:7:8: warning: multiple unsequenced modifications to 'q' [-Wunsequenced]
- q = q++ + ++q * --q - q--;
- ^ ~~
- 1 warning generated.
- $ ./a.out
- a = 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement