Open Hirrolot opened 5 years ago
Code:
#include <libdill.h> #include <assert.h> coroutine void empty() {} int main() { int all = bundle(); assert(all != -1); bundle_go(all, empty()); /* #9 */ assert(hclose(all) != -1); }
When trying to compile:
gymmasssorla@gymmasssorla-desktop:~$ gcc main.c -std=c99 -ldill -pthread In file included from main.c:1:0: main.c: In function ‘main’: main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘;’ before ‘volatile’ bundle_go(all, empty()); /* #9 */ ^ gymmasssorla@gymmasssorla-desktop:~$ gcc main.c -std=c11 -ldill -pthread In file included from main.c:1:0: main.c: In function ‘main’: main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘;’ before ‘volatile’ bundle_go(all, empty()); /* #9 */ ^ gymmasssorla@gymmasssorla-desktop:~$ gcc main.c -std=c90 -ldill -pthread In file included from main.c:1:0: main.c: In function ‘main’: main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘)’ before ‘:’ token bundle_go(all, empty()); /* #9 */ ^ main.c:9:2: error: expected ‘;’ before ‘volatile’ bundle_go(all, empty()); /* #9 */ ^
But everything works without the --std=X option. Is this a bug in the LibDill's source code?
--std=X
Code:
When trying to compile:
But everything works without the
--std=X
option. Is this a bug in the LibDill's source code?