summaryrefslogtreecommitdiff
path: root/pp2cc.py
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2011-12-04 15:03:31 +0000
committerPeter Wu <lekensteyn@gmail.com>2011-12-04 15:03:31 +0000
commit4a359599772a6059d95fb9c4c9f0ff071ccf7b50 (patch)
tree12e08a5e318737624b85de590b3447d76162914a /pp2cc.py
parent94fecea73b0185ff37eb47502f07a8f1e69cd3f9 (diff)
downloadpp2cc-4a359599772a6059d95fb9c4c9f0ff071ccf7b50.tar.gz
Update main warning if fn_main label exists, update README for automatic vars
Diffstat (limited to 'pp2cc.py')
-rwxr-xr-xpp2cc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp2cc.py b/pp2cc.py
index d1b0bdb..3dbbec0 100755
--- a/pp2cc.py
+++ b/pp2cc.py
@@ -192,7 +192,11 @@ class Parse(object):
output += self.globalInit
if not "main" in self.functions:
- self.logger.warning("No main function found with label 'fn_main'")
+ if "fn_main" in self.labels:
+ self.logger.info("No main function was found in C, but label"
+ " 'fn_main' exists in assembly")
+ else:
+ self.logger.warning("No main function found with label 'fn_main'")
output.append(self.asm.branch_op("BRA", "fn_main"))
output.append("")
output += self.codeSegment