diff options
author | Vincent Burns <discoloda@gmail.com> | 2014-01-13 01:51:36 -0500 |
---|---|---|
committer | Vincent Burns <discoloda@gmail.com> | 2014-01-13 01:51:36 -0500 |
commit | 5f905865bed2080c49b29dd48decdd24c4702cc9 (patch) | |
tree | 8fead84fbf7640df25467069f5bbaf6ce419afe7 /compiler/c2nim/tests/vincent.c | |
parent | 58855c2fc71294bd08ca6637473a33389ecc7de5 (diff) | |
download | Nim-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.c | 21 |
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'; +} |