struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2749.c
blob7b8a7737979e4ddf90c084ee2231b8359fbc8d33
1 /*
2 bug-2627.c, an issue in initialization of unterminated strings that contain \" or \\ escape sequences.
3 */
5 #include <testfwk.h>
7 #ifndef PORT_HOST
8 #pragma disable_warning 147
9 #endif
11 char array1[2] = "\"t";
12 char array2[2] = "\\t";
13 const char array3[2] = "\"t";
14 const char array4[2] = "\\t";
16 void testBug(void)
18 ASSERT(array1[0] == '\"');
19 ASSERT(array2[0] == '\\');
20 ASSERT(array3[0] == '\"');
21 ASSERT(array4[0] == '\\');