Mercurial > hg > Members > nobuyasu > test
changeset 0:1dd1eac8b18f
upload check return program
author | nobuyasu |
---|---|
date | Tue, 01 Mar 2011 04:31:21 +0900 |
parents | |
children | 456587e74f71 |
files | returnCheck/Makefile returnCheck/Makefile~ returnCheck/return.c returnCheck/return.cbc returnCheck/return.cbc~ returnCheck/return.c~ |
diffstat | 6 files changed, 90 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/returnCheck/Makefile Tue Mar 01 04:31:21 2011 +0900 @@ -0,0 +1,17 @@ +# +# Makefile +# + +program = return +objs = return.o +#CC = gcc +CC = ~/hg/CbC/build-gcc/INSTALL_DIR/bin/gcc +CFLAGS = -O0 -g + +$(program): $(objs) + $(CC) -o $(program) $^ +$(objs): $(program).c + $(CC) $(CFLAGS) -c $< + +clean: + rm -rf $(program) $(objs) \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/returnCheck/Makefile~ Tue Mar 01 04:31:21 2011 +0900 @@ -0,0 +1,16 @@ +# +# Makefile +# + +program = return +objs = return.o +CC = gcc +CFLAGS = -O0 -g + +$(program): $(objs) + $(CC) -o $(program) $^ +$(objs): $(program).c + $(CC) $(CFLAGS) -c $< + +clean: + rm -rf $(program) $(objs) \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/returnCheck/return.c Tue Mar 01 04:31:21 2011 +0900 @@ -0,0 +1,15 @@ +#include<stdio.h> + +int BUFSIZE = 1024; + + +void method(int n){ + // char string[BUFSIZE]; + printf("%d\n",n); + method(++n); +} + +int main(int argc, char* argv[]){ + method(0); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/returnCheck/return.cbc Tue Mar 01 04:31:21 2011 +0900 @@ -0,0 +1,16 @@ +#include<stdio.h> + +int BUFSIZE = 1024; + +__code method(int n); + +__code method(int n){ + // char string[BUFSIZE]; + printf("%d\n",n); + goto method(++n); +} + +int main(int argc, char* argv[]){ + goto method(0); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/returnCheck/return.cbc~ Tue Mar 01 04:31:21 2011 +0900 @@ -0,0 +1,15 @@ +#include<stdio.h> + +int BUFSIZE = 1024; + + +void method(int n){ + // char string[BUFSIZE]; + printf("%d\n",n); + method(++n); +} + +int main(int argc, char* argv[]){ + method(0); + return 0; +}