Starting loki programming guide
This commit is contained in:
11
loki_sample/gdb_example/buggy.c
Normal file
11
loki_sample/gdb_example/buggy.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++); // The bug is this extra semicolon
|
||||
printf("Counter is now %i\n",i);
|
||||
return 0;
|
||||
}
|
||||
// Should (wrongfully) only print out "Counter is now 10"
|
||||
// Note that GCC does not report an error. Clang reports the error.
|
Reference in New Issue
Block a user