scc

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

0255-init.c (243B)


      1 #define SIZ 6
      2 
      3 int test(char *);
      4 
      5 int
      6 test(char *s)
      7 {
      8 	if (s[0] != 'a')
      9 		return 1;
     10 	if (s[1] != 'b')
     11 		return 2;
     12 	if (s[2] != 'c')
     13 		return 3;
     14 	if (s[3] != '\0')
     15 		return 4;
     16 	return 0;
     17 }
     18 
     19 int
     20 main(void)
     21 {
     22 	return test((char[SIZ]) {"abc"});
     23 }