Skip to content

Instantly share code, notes, and snippets.

@dgutov
Created October 12, 2015 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgutov/19c45ef43d1c90b96483 to your computer and use it in GitHub Desktop.
Save dgutov/19c45ef43d1c90b96483 to your computer and use it in GitHub Desktop.
Semantic bug
struct foo {
int a;
int b;
};
struct bar {
int c;
int d;
};
foo tee(int i) {
foo f;
return f;
}
bar tee(long i) {
bar b;
return b;
}
int main() {
int i = 1;
long l = 2;
tee(i).|
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment