diff --git a/libacc/acc.cpp b/libacc/acc.cpp
index 823849c..da703a7 100644
--- a/libacc/acc.cpp
+++ b/libacc/acc.cpp
@@ -3868,7 +3868,7 @@
                     pGen->forceR0RVal();
                     pGen->convertR0(pCast);
                 } else {
-                    expr();
+                    commaExpr();
                     skip(')');
                 }
             } else if (t == '*') {
@@ -4076,12 +4076,21 @@
         }
     }
 
+    void commaExpr() {
+        for(;;) {
+            expr();
+            if (!accept(',')) {
+                break;
+            }
+        }
+    }
+
     void expr() {
         binaryOp(11);
     }
 
     int test_expr() {
-        expr();
+        commaExpr();
         pGen->forceR0RVal();
         return pGen->gtst(0, 0);
     }
@@ -4117,7 +4126,7 @@
                 a = test_expr();
             } else {
                 if (tok != ';')
-                    expr();
+                    commaExpr();
                 skip(';');
                 n = codeBuf.getPC();
                 a = 0;
@@ -4126,7 +4135,7 @@
                 skip(';');
                 if (tok != ')') {
                     t = pGen->gjmp(0);
-                    expr();
+                    commaExpr();
                     pGen->gjmp(n - codeBuf.getPC() - pGen->jumpOffset());
                     pGen->gsym(t);
                     n = t + 4;
@@ -4150,7 +4159,7 @@
         } else {
             if (accept(TOK_RETURN)) {
                 if (tok != ';') {
-                    expr();
+                    commaExpr();
                     pGen->forceR0RVal();
                     if (pReturnType->tag == TY_VOID) {
                         error("Must not return a value from a void function");
@@ -4166,7 +4175,7 @@
             } else if (accept(TOK_BREAK)) {
                 *(int *) l = pGen->gjmp(*(int *) l);
             } else if (tok != ';')
-                expr();
+                commaExpr();
             skip(';');
         }
     }
diff --git a/libacc/tests/data/comma.c b/libacc/tests/data/comma.c
new file mode 100644
index 0000000..496944c
--- /dev/null
+++ b/libacc/tests/data/comma.c
@@ -0,0 +1,35 @@
+int testReturn() {
+    return 10, 20, 30;
+}
+
+int testArg(int a) {
+    return a;
+}
+
+void testComma() {
+    int a;
+    0, a = 10,20;
+    printf("statement: %d\n", a);
+    a = 1;
+    if (a = 0, 1) {
+        printf("if: a = %d\n", a);
+    }
+    int b = 0;
+    a = 10;
+    while(b++,a--) {}
+    printf("while: b = %d\n", b);
+    b = 0;
+    for(b++,a = 0;b++, a < 10; b++, a++) {}
+    printf("for: b = %d\n", b);
+    b = testReturn();
+    printf("return: %d\n", b);
+    b = testArg((a,12));
+    printf("arg: %d\n", b);
+}
+
+
+
+int main() {
+    testComma();
+    return 0;
+}
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index 239bb9b..5f9a71e 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -354,6 +354,16 @@
 16|= 1  17
 """)
 
+    def testcomma(self):
+        self.compileCheck(["-R", "data/comma.c"], """Executing compiled code:
+result: 0""", """statement: 10
+if: a = 0
+while: b = 11
+for: b = 22
+return: 30
+arg: 12
+""")
+
 if __name__ == '__main__':
     if not outputCanRun():
         print "Many tests are expected to fail, because acc is not a 32-bit x86 Linux executable."
