Created
November 3, 2018 19:27
-
-
Save haxpor/bb0f898db85fdd837c7e0083a3a97605 to your computer and use it in GitHub Desktop.
Example of assert.c with -DNDEBUG compile flag. Try to compile with `gcc -DNDEBUG assert.c` and `gcc assert.c` to see differences.
This file contains 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
#include <stdio.h> | |
#include <assert.h> | |
int main(int argc, char* argv[]) | |
{ | |
int a = 10; | |
assert(a != 10); | |
printf("end of program\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment