BSD 4_4_Lite2 development
[unix-history] / usr / src / contrib / gcc-2.3.3 / stack.h
CommitLineData
6dce4937
C
1/* stack.h - structed access to object stacks
2 Copyright (C) 1988 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com).
4
5This program is free software; you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by the
7Free Software Foundation; either version 2, or (at your option) any
8later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19/* Summary: this file contains additional structures that layer
20 on top of obstacks for GNU C++. */
21
22/* Stack of data placed on obstacks. */
23
24struct stack_level
25{
26 /* Pointer back to previous such level. */
27 struct stack_level *prev;
28
29 /* Point to obstack we should return to. */
30 struct obstack *obstack;
31
32 /* First place we start putting data. */
33 tree *first;
34
35 /* Number of entries we can have from `first'.
36 Right now we are dumb: if we overflow, abort. */
37 int limit;
38};
39
40struct stack_level *push_stack_level ();
41struct stack_level *pop_stack_level ();