diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-01 10:41:44 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-01 10:41:44 -0800 |
commit | c523f984fca8a8f0ffcdbad0c6b1305a30033edb (patch) | |
tree | 2d0b184b9ae31420e313d92e13fbca5f83fcef17 | |
parent | 9c66347a6748ccd970897b684dc59b40808c27a2 (diff) |
remove unneeded KEEPALIVE in test_ccall
-rwxr-xr-x | tests/runner.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/runner.py b/tests/runner.py index 59cacd52..177b795c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6841,18 +6841,15 @@ Block 0: ''', post_build=post1) src = r''' #include <stdio.h> - // Optimizations might wipe out our functions without this - #define KEEPALIVE __attribute__((used)) - extern "C" { - int KEEPALIVE get_int() { return 5; } - float KEEPALIVE get_float() { return 3.14; } - char * KEEPALIVE get_string() { return "hello world"; } - void KEEPALIVE print_int(int x) { printf("%d\n", x); } - void KEEPALIVE print_float(float x) { printf("%.2f\n", x); } - void KEEPALIVE print_string(char *x) { printf("%s\n", x); } - int KEEPALIVE multi(int x, float y, int z, char *str) { if (x) puts(str); return (x+y)*z; } - int * KEEPALIVE pointer(int *in) { printf("%d\n", *in); static int ret = 21; return &ret; } + int get_int() { return 5; } + float get_float() { return 3.14; } + char * get_string() { return "hello world"; } + void print_int(int x) { printf("%d\n", x); } + void print_float(float x) { printf("%.2f\n", x); } + void print_string(char *x) { printf("%s\n", x); } + int multi(int x, float y, int z, char *str) { if (x) puts(str); return (x+y)*z; } + int * pointer(int *in) { printf("%d\n", *in); static int ret = 21; return &ret; } } int main(int argc, char **argv) { |