struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2751.c
blobcfb20a0b3a4f70c0f11214c11c17ae4c48841b4b
1 /*
2 bug-2643.c
3 char was the same type as either signed char or unsigned char.
4 */
6 #include <testfwk.h>
7 #include <string.h>
9 const char *g;
11 void f(void)
13 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
14 g = _Generic("test"[0], char: "char", unsigned char: "unsigned char", signed char: "signed char");
15 #endif
18 void testBug(void)
20 f();
21 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
22 ASSERT (!strcmp(g, "char"));
23 #endif