scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0031-krtypes.c (368B)


      1 /*
      2 PATTERN:
      3 0031-krtypes.c:32: error: incompatible types when assigning
      4 0031-krtypes.c:33: error: incompatible types when assigning
      5 0031-krtypes.c:34: error: incompatible types when assigning
      6 .
      7 */
      8 
      9 int
     10 f1(char c)
     11 {
     12 	return c;
     13 }
     14 
     15 int
     16 f2(float c)
     17 {
     18 	return c;
     19 }
     20 
     21 int
     22 f3(int a, ...)
     23 {
     24 	return a;
     25 }
     26 
     27 int
     28 main()
     29 {
     30 	int (*fp)();
     31 
     32 	fp = f1;
     33 	fp = f2;
     34 	fp = f3;
     35 
     36 	return 0;
     37 }