int foo4(int i, int j) { return foo3(i, j); }
int bar3 (struct S x, struct S y, struct S z) { return foo3 (y, x, z); }
void foo4() { foo3(1,2,3,4,5,6,7,8,9); // fn call with more than 8 arguments. Memory stack is allocated }
void bar3(void) { int x; if(x) /* { dg-warning "'x' is used uninitialized in this function" "uninitialized" { xfail *-*-* } } */ foo3(&x); }
void testLua(lua_State* L) { printf("------------testLua------------\n"); ELuna::LuaFunction<void> foo0(L, "foo0"); ELuna::LuaFunction<void> foo1(L, "foo1"); ELuna::LuaFunction<void> foo2(L, "foo2"); ELuna::LuaFunction<void> foo3(L, "foo3"); ELuna::LuaFunction<void> foo4(L, "foo4"); ELuna::LuaFunction<void> foo5(L, "foo5"); ELuna::LuaFunction<void> foo6(L, "foo6"); ELuna::LuaFunction<void> foo7(L, "foo7"); ELuna::LuaFunction<void> foo8(L, "foo8"); ELuna::LuaFunction<void> foo9(L, "foo9"); ELuna::LuaFunction<int> retFoo0(L, "retFoo0"); ELuna::LuaFunction<int> retFoo1(L, "retFoo1"); ELuna::LuaFunction<int> retFoo2(L, "retFoo2"); ELuna::LuaFunction<int> retFoo3(L, "retFoo3"); ELuna::LuaFunction<int> retFoo4(L, "retFoo4"); ELuna::LuaFunction<int> retFoo5(L, "retFoo5"); ELuna::LuaFunction<int> retFoo6(L, "retFoo6"); ELuna::LuaFunction<int> retFoo7(L, "retFoo7"); ELuna::LuaFunction<int> retFoo8(L, "retFoo8"); ELuna::LuaFunction<int> retFoo9(L, "retFoo9"); ELuna::LuaFunction<TestObj*> luaTestObjPointer(L, "luaTestObjPointer"); ELuna::LuaFunction<TestObj&> luaTestObjRef(L, "luaTestObjRef"); ELuna::LuaFunction<TestObj> luaTestObj(L, "luaTestObj"); foo0(); foo1(1); foo2(1,2); foo3(1,2,3); foo4(1,2,3,4); foo5(1,2,3,4,5); foo6(1,2,3,4,5,6); foo7(1,2,3,4,5,6,7); foo8(1,2,3,4,5,6,7,8); foo9(1,2,3,4,5,6,7,8,9); printf("retFoo0: %d\n", retFoo0()); printf("retFoo1: %d\n", retFoo1(1)); printf("retFoo2: %d\n", retFoo2(1,2)); printf("retFoo3: %d\n", retFoo3(1,2,3)); printf("retFoo4: %d\n", retFoo4(1,2,3,4)); printf("retFoo5: %d\n", retFoo5(1,2,3,4,5)); printf("retFoo6: %d\n", retFoo6(1,2,3,4,5,6)); printf("retFoo7: %d\n", retFoo7(1,2,3,4,5,6,7)); printf("retFoo8: %d\n", retFoo8(1,2,3,4,5,6,7,8)); printf("retFoo9: %d\n", retFoo9(1,2,3,4,5,6,7,8,9)); printf("luaTestObjPointer: \n"); TestObj pObj = TestObj("TestObjPointer"); TestObj* retPObj = luaTestObjPointer(&pObj); pObj.print(); retPObj->print(); printf("luaTestObjRef1: \n"); TestObj objRef1("TestObjRef1"); TestObj& retObjRef1 = luaTestObjRef(&objRef1); objRef1.print(); retObjRef1.print(); printf("luaTestObjRef2: \n"); TestObj objRef2("TestObjRef2"); TestObj& retObjRef2 = luaTestObjRef(objRef2); objRef2.print(); retObjRef2.print(); printf("luaTestObj: \n"); TestObj obj("TestObj"); TestObj retObj = luaTestObj(obj); obj.print(); retObj.print(); printf("pass refrence to luaFunction the same as object!\n"); }
void foo2 () { foo3 (); }
// test1: file open, exit int main(int argc, char *argv[]) { foo1(); foo3(); return 0; }
void test2() { foo3(); }
int main(void){ foo3(); return 0; }
int baz3 (struct S x, struct S y, struct S z) { return foo3 (y, z, x); }
int foo2 (int b) { return foo3 (b + getpid ()); }
static int varinfo3_main ( void ) { foo3(); return 0; }
int bar3 (int x) { return foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x); }