Skip to content

Instantly share code, notes, and snippets.

@janpipek
Created June 13, 2012 08:05
Show Gist options
  • Save janpipek/2922685 to your computer and use it in GitHub Desktop.
Save janpipek/2922685 to your computer and use it in GitHub Desktop.
Different implicit return values when compiled using gcc and g++
// gcc no-return-value.c --- prints 0
// g++ no-return-value.c --- prints a random 32-bit integer
// (using gcc 4.4)
#include "stdio.h"
int a() { }
int main() {
printf("%d", a());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment