Home | History | Annotate | Line # | Download | only in lint1
lex_wide_string.c revision 1.1
      1 /*	$NetBSD: lex_wide_string.c,v 1.1 2021/06/19 08:30:08 rillig Exp $	*/
      2 # 3 "lex_wide_string.c"
      3 
      4 /*
      5  * Test lexical analysis of wide string constants.
      6  *
      7  * C99 6.4.5 "String literals"
      8  */
      9 
     10 void sink(const int *);
     11 
     12 void
     13 test(void)
     14 {
     15 	sink(L"");
     16 
     17 	sink(L"hello, world\n");
     18 
     19 	sink(L"\0");
     20 
     21 	sink(L"\0\0\0\0");
     22 
     23 	/* expect+1: no hex digits follow \x [74] */
     24 	sink(L"\x");
     25 
     26 	/* expect+1: dubious escape \y [79] */
     27 	sink(L"\y");
     28 }
     29