OSDN Git Service

* gcc.c-torture/execute/20040208-2.c: Move ...
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / 20000818-1.c
1 /* Copyright (C) 2000  Free Software Foundation.
2
3    by Manfred Hollstein <manfredh@redhat.com>  */
4
5 void *temporary_obstack;
6
7 static int input (void);
8 static int ISALNUM (int ch);
9 static void obstack_1grow (void **ptr, int ch);
10
11 int yylex (void);
12 int main (void);
13
14 int main (void)
15 {
16   int ch = yylex ();
17
18   exit (0);
19 }
20
21 int yylex (void)
22 {
23   int ch;
24
25 #ifndef WORK_AROUND
26   for (;;)
27     {
28       ch = input ();
29       if (ISALNUM (ch))
30         obstack_1grow (&temporary_obstack, ch);
31       else if (ch != '_')
32         break;
33     }
34 #else
35   do
36     {
37       ch = input ();
38       if (ISALNUM (ch))
39         obstack_1grow (&temporary_obstack, ch);
40     } while (ch == '_');
41 #endif
42
43   return ch;
44 }
45
46 static int input (void)
47 {
48   return 0;
49 }
50
51 static int ISALNUM (int ch)
52 {
53   return ((ch >= 'A' && ch <= 'Z')
54           || (ch >= 'a' && ch <= 'z')
55           || (ch >= '0' && ch <= '0'));
56 }
57
58 static void obstack_1grow (void **ptr, int ch)
59 {
60 }