Skip to content

Instantly share code, notes, and snippets.

@gavinanderegg
Last active November 15, 2017 18:03
Show Gist options
  • Save gavinanderegg/0136ee42c7d4ce810c560443dfc43499 to your computer and use it in GitHub Desktop.
Save gavinanderegg/0136ee42c7d4ce810c560443dfc43499 to your computer and use it in GitHub Desktop.
int main(int argc, char** argv) {
int a;
int b;
a = b = 1;
a == b;
return 0;
}
/*
$ gcc test.cpp
test.cpp:7:4: warning: equality comparison result unused [-Wunused-comparison]
a == b;
~~^~~~
test.cpp:7:4: note: use '=' to turn this equality comparison into an assignment
a == b;
^~
=
1 warning generated.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment