2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / annota3.c
1 #include <stdio.h>
2 #include <signal.h>
3
4
5 #ifdef PROTOTYPES
6 void
7 handle_USR1 (int sig)
8 {
9 }
10 #else
11 void
12 handle_USR1 (sig)
13 int sig;
14 {
15 }
16 #endif
17
18 int value;
19
20 #ifdef PROTOTYPES
21 int
22 main (void)
23 #else
24 int
25 main ()
26 #endif
27 {
28 int my_array[3] = { 1, 2, 3 }; /* break main */
29
30 value = 7;
31
32 #ifdef SIGUSR1
33 signal (SIGUSR1, handle_USR1);
34 #endif
35
36 printf ("value is %d\n", value);
37 printf ("my_array[2] is %d\n", my_array[2]);
38
39 {
40 int i;
41 for (i = 0; i < 5; i++)
42 value++; /* increment value */
43 }
44
45 return 0; /* after loop */
46 }
47
This page took 0.029196 seconds and 4 git commands to generate.