scc

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

0181-stringize.c (200B)


      1 #define XSTR(x) #x
      2 #define STR(x)  XSTR(x)
      3 #define S       y = "str"
      4 
      5 int
      6 main()
      7 {
      8 	char *s, *t = STR(S);
      9 
     10 	for (s = "y = \"str\""; *s && *t; ++s, ++t) {
     11 		if (*s != *t)
     12 			return 1;
     13 	}
     14 
     15 	return 0;
     16 }