Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created April 27, 2015 16:19
Show Gist options
  • Select an option

  • Save KristianLyng/4d9edd74557829f05f37 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/4d9edd74557829f05f37 to your computer and use it in GitHub Desktop.
kristian@edwin:~$ cat foo.c; gcc -x c - < foo.c 2>/dev/null; ./a.out
int main(int argc, char** argv) {
print_stuff(5);
}
void print_stuff(double d) {
printf("%f\n", d);
}
0.000000
kristian@edwin:~$ cat foo2.c; gcc -x c - < foo2.c 2>/dev/null; ./a.out
void print_stuff(double d);
int main(int argc, char** argv) {
print_stuff(5);
}
void print_stuff(double d) {
printf("%f\n", d);
}
5.000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment