riscv: Support $ in identifiers in extended asm.
[tinycc.git] / tests / tests2 / 23_type_coercion.c
blob1fcc33519c88ddaca25e61843b79b78899d5e9fa
1 #include <stdio.h>
3 void charfunc(char a)
5 printf("char: %c\n", a);
8 void intfunc(int a)
10 printf("int: %d\n", a);
13 void floatfunc(float a)
15 printf("float: %f\n", a);
18 int main()
20 charfunc('a');
21 charfunc(98);
22 charfunc(99.0);
24 intfunc('a');
25 intfunc(98);
26 intfunc(99.0);
28 floatfunc('a');
29 floatfunc(98);
30 floatfunc(99.0);
32 /* printf("%c %d %f\n", 'a', 'b', 'c'); */
33 /* printf("%c %d %f\n", 97, 98, 99); */
34 /* printf("%c %d %f\n", 97.0, 98.0, 99.0); */
36 char b = 97;
37 char c = 97.0;
39 printf("%d %d\n", b, c);
41 int d = 'a';
42 int e = 97.0;
44 printf("%d %d\n", d, e);
46 float f = 'a';
47 float g = 97;
49 printf("%f %f\n", f, g);
51 return 0;
54 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/