2013-09-20 Chung-Lin Tang <cltang@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / annota1.c
CommitLineData
a4cb37cb
SS
1#include <stdio.h>
2#include <signal.h>
3
a4cb37cb 4
085dd6e6
JM
5#ifdef PROTOTYPES
6void
7handle_USR1 (int sig)
8{
9}
10#else
a4cb37cb
SS
11void
12handle_USR1 (sig)
13 int sig;
14{
15}
085dd6e6 16#endif
a4cb37cb
SS
17
18int value;
19
085dd6e6
JM
20#ifdef PROTOTYPES
21int
22main (void)
23#else
a4cb37cb
SS
24int
25main ()
085dd6e6 26#endif
a4cb37cb 27{
2c8910ba 28 int my_array[3] = { 1, 2, 3 }; /* break main */
a4cb37cb
SS
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]);
5c44784c
JM
38
39 {
40 int i;
41 for (i = 0; i < 5; i++)
2c8910ba 42 value++; /* increment value */
5c44784c 43 }
a4cb37cb 44
2c8910ba 45 return 0; /* after loop */
a4cb37cb
SS
46}
47
This page took 1.273035 seconds and 4 git commands to generate.