Mercurial > hg > CbC > CbC_examples
changeset 7:e1e9a4eac42d
modify Makefile
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 27 Oct 2014 20:21:44 +0900 |
parents | 144482c2dcc1 |
children | 37a10fd62ea9 |
files | Makefile test2.c |
diffstat | 2 files changed, 23 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Wed Oct 22 19:15:03 2014 +0900 +++ b/Makefile Mon Oct 27 20:21:44 2014 +0900 @@ -1,6 +1,6 @@ CC=/Users/e105711/prog/seminar/CbC/llvmInst/Debug+Asserts/bin/clang -TARGET=bug conv fact-a loto6 normal normal2 test01 test02 test04 test05 test_array test_call test_cs test_para test_para2 test_para4 test_return test_struct test_tailcall1 test_tree tmp1 tmp2 tmp4 test_csp1 test_func2code tmpa too-long-argument test1 stack1 -CFLAGS=-O2 -D"CLANG" +TARGET=bug conv fact-a loto6 normal normal2 test01 test02 test04 test05 test_array test_call test_cs test_para test_para2 test_para4 test_return test_struct test_tailcall1 test_tree tmp1 tmp2 tmp4 test_csp1 test_func2code tmpa too-long-argument test1 stack1 test2 arg test_para3 +CFLAGS= -D"CLANG" .SUFFIXES: .c .o
--- a/test2.c Wed Oct 22 19:15:03 2014 +0900 +++ b/test2.c Mon Oct 27 20:21:44 2014 +0900 @@ -10,38 +10,37 @@ void *env; struct packet { - int bit; - char *msg; - __code (*next)(); + int bit; + char *msg; + __code (*next)(); }; __code print_struct(struct packet pkt) { - printf("#0017:bit: %d\n", pkt.bit); - printf("#0018:message: %s\n", pkt.msg); - goto ret(0, env); + printf("#0017:bit: %d\n", pkt.bit); + printf("#0018:message: %s\n", pkt.msg); + goto ret(0, env); } __code initSender(int init_bit, struct packet pkt) { - sender_bit = init_bit; - pkt.next = print_struct; - printf("#0026:initSender bit: %d\n", pkt.bit); - printf("#0027:initSender message: %s\n", pkt.msg); - printf("#0028:sender_bit: %d\n", sender_bit); - goto print_struct(pkt); + sender_bit = init_bit; + pkt.next = print_struct; + printf("#0026:initSender bit: %d\n", pkt.bit); + printf("#0027:initSender message: %s\n", pkt.msg); + printf("#0028:sender_bit: %d\n", sender_bit); + goto print_struct(pkt); } int main(void) { - struct packet pkt; - pkt.bit = 1; - pkt.msg = "hogehoge"; - pkt.next = initSender; - ret = __return; - env = __environment; - printf("#0040:main bit: %d\n", pkt.bit); - printf("#0041:main message: %s\n", pkt.msg); - goto initSender(0, pkt); + struct packet pkt; + pkt.bit = 1; + pkt.msg = "hogehoge"; + pkt.next = initSender; + ret = __return; + env = __environment; + printf("#0040:main bit: %d\n", pkt.bit); + printf("#0041:main message: %s\n", pkt.msg); + goto initSender(0, pkt); } -