分类:
2011-01-11 19:55:16
I cannot reproduce this for const or regparm. These are the two I tried.
extern int foo (int) __attribute ((regparm (1), const));
//extern int bar (int) __attribute ((regparm (1), const));
__typeof (foo) __foo;
__typeof (foo) foo __asm ("__foo") __attribute ((visibility ("hidden")));
int
foo (int a)
{
return a;
}
int
bar (int a)
{
return a;
}
int
xyzzy (int a)
{
return foo (a) == 1 || foo (a) == 2;
}
int
xyzzy2 (int a)
{
return bar (a) == 1 || bar (a) == 2;
}