Last active
August 29, 2015 14:22
-
-
Save thekvs/0d2d3f6b112072ef0c04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kvs@lair tmp:> cat t.c | |
| #include <stdio.h> | |
| int | |
| main() | |
| { | |
| char *p = "aaa"; | |
| if (p = NULL) { | |
| printf("WHAT?\n"); | |
| } | |
| return 0; | |
| } | |
| kvs@lair tmp:> gcc -Wall t.c -o t | |
| t.c: In function ‘main’: | |
| t.c:8:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses] | |
| if (p = NULL) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment