Add support of C++ for workers.

This commit is contained in:
Patrick Pelissier committed 2017-12-16 20:54:17 +01:00
1 parent 9020baf364
commit 8aa3c86ce9
3 files changed
+59 -9

No files matched your search

+2 -2
View File
@@ -31,7 +31,7 @@ struct fib2_s {
int x, n;
};
static void subfunc_1 (void *data) {
struct fib2_s *f = data;
struct fib2_s *f = M_ASSIGN_CAST (struct fib2_s *, data);
f->x = fib (f->n );
}
static int fib(int n)
@@ -58,7 +58,7 @@ static void test1(void)
worker_clear(w_g);
}
#if defined(__GNUC__) && (!defined(__clang__) || WORKER_CLANG_BLOCK)
#if defined(__GNUC__) && (!defined(__clang__) || WORKER_CLANG_BLOCK || WORKER_CPP_FUNCTION)
/* The macro version will generate warnings about shadow variables.
There is no way to avoid this. */