File: generic-schar.c

package info (click to toggle)
sparse 0.6.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,868 kB
  • sloc: ansic: 46,050; sh: 614; python: 301; perl: 293; makefile: 279
file content (39 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#define typename(x) _Generic((x) 0,			\
char:			"char",				\
signed char:		"signed char",			\
unsigned char:		"unsigned char",		\
default:		"???")

#define TEST(name, x)	\
static const char *test_ ## name(void) { return typename(x); }

TEST(char, char)
TEST(schar, signed char)
TEST(uchar, unsigned char)

/*
 * check-name: generic-schar
 * check-command: test-linearize --arch=i386 -fsigned-char $file
 * check-known-to-fail
 *
 * check-output-start
test_char:
.L0:
	<entry-point>
	ret.32      "char"


test_schar:
.L2:
	<entry-point>
	ret.32      "signed char"


test_uchar:
.L4:
	<entry-point>
	ret.32      "unsigned char"


 * check-output-end
 */