gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / all-types.c
CommitLineData
c906108c
SS
1/*
2 * the basic C types.
3 */
4
5#if !defined (__STDC__) && !defined (_AIX)
6#define signed /**/
7#endif
8
9char v_char;
10signed char v_signed_char;
11unsigned char v_unsigned_char;
12
13short v_short;
14signed short v_signed_short;
15unsigned short v_unsigned_short;
16
17int v_int;
18signed int v_signed_int;
19unsigned int v_unsigned_int;
20
21long v_long;
22signed long v_signed_long;
23unsigned long v_unsigned_long;
24
25float v_float;
26double v_double;
27
28int main ()
29{
30 extern void dummy();
31#ifdef usestubs
32 set_debug_traps();
33 breakpoint();
34#endif
35 dummy();
36 return 0;
37
38}
39
40void dummy()
41{
42 /* Some linkers (e.g. on AIX) remove unreferenced variables,
43 so make sure to reference them. */
44 v_char = 'A';
45 v_signed_char = 'B';
46 v_unsigned_char = 'C';
47
48 v_short = 3;
49 v_signed_short = 4;
50 v_unsigned_short = 5;
51
52 v_int = 6;
53 v_signed_int = 7;
54 v_unsigned_int = 8;
55
56 v_long = 9;
57 v_signed_long = 10;
58 v_unsigned_long = 11;
59
60 v_float = 100.343434;
61 v_double = 200.565656;
62}
This page took 1.494289 seconds and 4 git commands to generate.