Handle functions with anonymous arguments
Example:
int f(int a, int, int c) {
return a + c;
}
diff --git a/libacc/tests/data/funcargs.c b/libacc/tests/data/funcargs.c
new file mode 100644
index 0000000..1dce226
--- /dev/null
+++ b/libacc/tests/data/funcargs.c
@@ -0,0 +1,8 @@
+int f(int a,int, int c) {
+ return a + c;
+}
+
+int main() {
+ return f(1,2,3);
+}
+
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index ed20334..bef9fc6 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -439,6 +439,11 @@
result: 3
""","""""")
+ def testFuncArgs(self):
+ self.compileCheck(["-R", "data/funcargs.c"], """Executing compiled code:
+result: 4
+""","""""")
+
def main():
parseArgv()
if not outputCanRun():