summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO15
-rwxr-xr-xpp2cc.py8
2 files changed, 23 insertions, 0 deletions
diff --git a/TODO b/TODO
index a5d5ecc..9d28b80 100644
--- a/TODO
+++ b/TODO
@@ -2,3 +2,18 @@ Post decrement/increment operators:
p-- p++
x.y x->y
+
+Array support:
+int a[][2] = {{1, 2}, {3, 4}};
+int b[1][2];
+int *c[2];
+a[1][1];
+c[0] = &x;// where int x = 1;
+int *p = a[0];// points to address of first element
+int x = *a[0];// equals *(a[0])
+
+static variables in functions
+
+Type checking
+
+pointer functions
diff --git a/pp2cc.py b/pp2cc.py
index 3dbbec0..2f58f9b 100755
--- a/pp2cc.py
+++ b/pp2cc.py
@@ -197,6 +197,14 @@ class Parse(object):
" 'fn_main' exists in assembly")
else:
self.logger.warning("No main function found with label 'fn_main'")
+ for function in self.functions.values():
+ if not function.isLinked():
+ if "fn_" + function.name in self.labels:
+ self.logger.info("Function '{}' is declared and found in"
+ " assembly".format(function.name))
+ else:
+ self.logger.warning("Function '{}' is declared but not defined"
+ .format(function.name))
output.append(self.asm.branch_op("BRA", "fn_main"))
output.append("")
output += self.codeSegment