source: branches/libc-0.6/testcase/456/simple.c@ 2641

Last change on this file since 2641 was 325, checked in by bird, 22 years ago

Enumerations.

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 902 bytes
Line 
1/* step this code and check that everything is visible and step ordre is ok. */
2
3/* Check that both these are viewable in the 'program monitor'. */
4static int fileglobal = 2;
5int realglobal = 1;
6
7/* Enum test: check that these are ok and the value is stringified */
8enum ENM { enmA, enmB, enmC};
9static enum ENM enmfileglobal = enmA;
10enum ENM enmrealglobal = enmB;
11
12/* Enum test: check that these are ok and the value is stringified */
13enum { enmAnon, enmBnon, enmCnon}
14 enmAnonymous;
15
16
17int foo(int i, int j)
18{
19 static int myVar = 0;
20 static int myVar2;
21
22 if (myVar++)
23 {
24 int scope;
25
26 return scope + myVar + myVar2;
27 }
28 myVar2++;
29 return 0;
30}
31
32static int bar(int i, int j)
33{
34 return i+j;
35}
36
37void stub(void)
38{
39}
40
41int main(int argc, char **argv)
42{
43 int i;
44 i = foo(1, 2);
45 i += bar(1, 2);
46 stub();
47 return i;
48}
Note: See TracBrowser for help on using the repository browser.