summary refs log tree commit diff stats
path: root/compiler/c2nim/tests/vincent.c
blob: 24c6d6425f1430c60505060835a55b1bcf20a8e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdlib.h>
#include <stdio.h>

int rand(void);

int id2(void) {
    return (int *)1;
}

int id(void (*f)(void)) {
    f();
    ((void (*)(int))f)(10);
    return 10;
    return (20+1);
    return (int *)id;
}

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';
}