summaryrefslogtreecommitdiff
path: root/tests/arr
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-02-25 20:35:46 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-02-25 20:35:46 -0500
commit19eafbc01a492e8f1df25cef52678ed8f76d3e63 (patch)
treee818784215d9f7873e9495f003dd4cdaa09d5b63 /tests/arr
parentb1c2b4bcabfd3ff01921e2601d41a33b40ec1f3b (diff)
fixed bugs with new arg order system
also now struct parameters are "officially" part of the language
Diffstat (limited to 'tests/arr')
-rw-r--r--tests/arr/arr.toc11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/arr/arr.toc b/tests/arr/arr.toc
index f7c6707..a682283 100644
--- a/tests/arr/arr.toc
+++ b/tests/arr/arr.toc
@@ -1,9 +1,16 @@
puti ::= fn(x: int) {
- #C("extern int printf(const char *fmt, ...)");
+//tcc's giving me "incompatible types for redefinition of 'printf'" for some reason (even though the declarations have the exact same type)
+ #C("#ifndef __TINYC__
+extern int printf(const char *fmt, ...);
+#endif
+");
#C("printf(\"%ld\\n\", (long)x)");
};
putf ::= fn(x: float) {
- #C("extern int printf(const char *fmt, ...)");
+ #C("#ifndef __TINYC__
+extern int printf(const char *fmt, ...);
+#endif
+");
#C("printf(\"%f\\n\", (double)x)");
};