Created
April 16, 2014 13:29
-
-
Save tanakamura/10875245 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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