Support nested macros. (Still don't support macro arguments.)
Now you can say:
#define A B
#define B C
#define C 4
int x = A;
And it will work as expected.
Print an error message rather than assert when we're expecting a
function value, but don't find one.
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index c982d16..8f4920b 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -373,6 +373,12 @@
Total bad: 0
""")
+ def testMacros(self):
+ self.compileCheck(["-R", "data/macros.c"], """Executing compiled code:
+result: 0""", """A = 6
+A = 10
+""")
+
def testpointers2(self):
self.compileCheck(["-R", "data/pointers2.c"], """Executing compiled code:
result: 0""", """a = 0, *pa = 0