Skip to content
Snippets Groups Projects
Commit 8a207a4d authored by Rui Ueyama's avatar Rui Ueyama
Browse files

Allow functions returning void

parent f3bdaefb
Branches
No related merge requests found
......@@ -70,6 +70,8 @@ static int static_fn() { return 3; }
int param_decay(int x[]) { return x[0]; }
void voidfn() {}
int main() {
assert(8, ({ int a=3; int z=5; a+z; }), "int a=3; int z=5; a+z;");
......@@ -451,6 +453,8 @@ int main() {
assert(2, ({ int i=0; switch(1) { case 0: 0; case 1: 0; case 2: 0; i=2; } i; }), "int i=0; switch(1) { case 0: 0; case 1: 0; case 2: 0; i=2; } i;");
assert(0, ({ int i=0; switch(3) { case 0: 0; case 1: 0; case 2: 0; i=2; } i; }), "int i=0; switch(3) { case 0: 0; case 1: 0; case 2: 0; i=2; } i;");
voidfn();
printf("OK\n");
return 0;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment