Closed boutier closed 11 years ago
You need to learn how to quote source code on github (with markdown), but I see what the issue is. I'll complete the preliminary pass that adds temporary variables to handle that case to: x = f(); would become tmp = f(); x = tmp;
static assignment is bugged.
The following code will produce: file.cpc:48:3: error: 'bugged_pointer___0' undeclared (first use in this function)
include <cpc/cpc_runtime.h>
include <cpc/cpc_io.h>
static void *bugged_pointer;
cps void* get_pointer(void) { return NULL; }
cps void big_bug(void) { bugged_pointer = get_pointer(); }
int main(int argc, char **argv) { cpc_spawn big_bug(); cpc_main_loop(); return 0; }