Skip to content

Instantly share code, notes, and snippets.

@tanakamura
Created April 16, 2014 13:29
Show Gist options
  • Save tanakamura/10875245 to your computer and use it in GitHub Desktop.
Save tanakamura/10875245 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int func(int v) {
printf("%d\n", v);
return 0;
}
void f1(unsigned char b, unsigned char c) {
auto a = b + c;
func(a);
printf("%d\n", sizeof(a)); // 4
}
void f2(unsigned char b, unsigned char c)
{
func(b + c);
}
int main()
{
f1(1,255);
f2(1,255);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment