1 /* $NetBSD: msg_292.c,v 1.4 2022/02/27 19:32:51 rillig Exp $ */ 2 # 3 "msg_292.c" 3 4 // Test for message: cannot concatenate wide and regular string literals [292] 5 6 const char c_c_c_w_w_w[] = 7 "c2" 8 "c 4" 9 "c 8" 10 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 11 L"w2" 12 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 13 L"w 4" 14 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 15 L"w 8"; 16 /* The 15 results from 2 + 4 + 8 + '\0'. */ 17 /* expect+1: error: negative array dimension (-15) [20] */ 18 typedef int reveal_sizeof_c_c_c_w_w_w[-(int)sizeof(c_c_c_w_w_w)]; 19 20 const char c_w_c_w_c_w[] = 21 "c2" 22 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 23 L"w2" 24 "c 4" 25 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 26 L"w 4" 27 "c 8" 28 /* expect+1: error: cannot concatenate wide and regular string literals [292] */ 29 L"w 8"; 30 /* expect+1: error: negative array dimension (-15) [20] */ 31 typedef int reveal_sizeof_c_w_c_w_c_w[-(int)sizeof(c_w_c_w_c_w)]; 32