• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define typename(x) _Generic((x) 0,			\
2 char:			"char",				\
3 signed char:		"signed char",			\
4 unsigned char:		"unsigned char",		\
5 default:		"???")
6 
7 #define TEST(name, x)	\
8 static const char *test_ ## name(void) { return typename(x); }
9 
10 TEST(char, char)
11 TEST(schar, signed char)
12 TEST(uchar, unsigned char)
13 
14 /*
15  * check-name: generic-schar
16  * check-command: test-linearize --arch=i386 -fsigned-char $file
17  * check-known-to-fail
18  *
19  * check-output-start
20 test_char:
21 .L0:
22 	<entry-point>
23 	ret.32      "char"
24 
25 
26 test_schar:
27 .L2:
28 	<entry-point>
29 	ret.32      "signed char"
30 
31 
32 test_uchar:
33 .L4:
34 	<entry-point>
35 	ret.32      "unsigned char"
36 
37 
38  * check-output-end
39  */
40