summary refs log tree commit diff stats
path: root/compiler/c2nim/tests/vincent.c
diff options
context:
space:
mode:
authorVincent Burns <discoloda@gmail.com>2014-01-13 01:51:36 -0500
committerVincent Burns <discoloda@gmail.com>2014-01-13 01:51:36 -0500
commit5f905865bed2080c49b29dd48decdd24c4702cc9 (patch)
tree8fead84fbf7640df25467069f5bbaf6ce419afe7 /compiler/c2nim/tests/vincent.c
parent58855c2fc71294bd08ca6637473a33389ecc7de5 (diff)
downloadNim-5f905865bed2080c49b29dd48decdd24c4702cc9.tar.gz
Fix for some comments during if statements
added test files
Diffstat (limited to 'compiler/c2nim/tests/vincent.c')
-rw-r--r--compiler/c2nim/tests/vincent.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/compiler/c2nim/tests/vincent.c b/compiler/c2nim/tests/vincent.c
new file mode 100644
index 000000000..b9436c39b
--- /dev/null
+++ b/compiler/c2nim/tests/vincent.c
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+int rand(void);
+
+int main() {
+    float f = .2,
+          g = 2.,
+          h = 1.0+rand(),
+          i = 1.0e+3;
+    int j, a;
+    for(j = 0, a = 10; j < 0; j++, a++) ;
+    do {
+        printf("howdy");
+    } while(--i, 0);
+    if(1)
+        printf("1"); // error from this comment
+    else
+        printf("2");
+    return '\x00';
+}