]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/lex.h
decl.c (register_dtor_fn): Mark cleanup as used.
[gcc.git] / gcc / cp / lex.h
CommitLineData
f5adbb8d 1/* Define constants and variables for communication with the parser.
d6a8bdff 2 Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
43c6a96a 3 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
8d08fdba
MS
4 Hacked by Michael Tiemann (tiemann@cygnus.com)
5 and by Brendan Kehoe (brendan@cygnus.com).
6
f5adbb8d
SB
7 This file is part of GCC.
8
9 GCC is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GCC is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to the Free
21 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 02111-1307, USA. */
23
8d08fdba 24
88657302
RH
25#ifndef GCC_CP_LEX_H
26#define GCC_CP_LEX_H
0e5921e8
ZW
27
28#if 0
29/* Formerly, the RID_* values used as mask bits did not fit into a
30 single 32-bit word. Now they do, but let's preserve the old logic
31 in case they ever stop fitting again. -zw, 8 Aug 2000 */
8d08fdba 32
8d08fdba 33/* The type that can represent all values of RIDBIT. */
e92cc029 34/* We assume that we can stick in at least 32 bits into this. */
8d08fdba
MS
35typedef struct { unsigned long idata[2]; }
36 RID_BIT_TYPE;
37
e92cc029 38/* Be careful, all these modify N twice. */
8d08fdba
MS
39#define RIDBIT_SETP(N, V) (((unsigned long)1 << (int) ((N)%32)) \
40 & (V).idata[(N)/32])
41#define RIDBIT_NOTSETP(NN, VV) (! RIDBIT_SETP (NN, VV))
42#define RIDBIT_SET(N, V) do { \
43 (V).idata[(N)/32] \
44 |= ((unsigned long)1 << (int) ((N)%32)); \
45 } while (0)
46#define RIDBIT_RESET(N, V) do { \
47 (V).idata[(N)/32] \
48 &= ~((unsigned long)1 << (int) ((N)%32)); \
49 } while (0)
50#define RIDBIT_RESET_ALL(V) do { \
51 (V).idata[0] = 0; \
52 (V).idata[1] = 0; \
53 } while (0)
54#define RIDBIT_ANY_SET(V) ((V).idata[0] || (V).idata[1])
0e5921e8
ZW
55#else
56typedef unsigned long RID_BIT_TYPE; /* assumed at least 32 bits */
57#define RIDBIT_OF(R) ((unsigned long)1 << (int) (R))
58
59#define RIDBIT_SETP(N, V) ((V) & RIDBIT_OF (N))
60#define RIDBIT_NOTSETP(N, V) (! ((V) & RIDBIT_OF (N)))
61#define RIDBIT_ANY_SET(V) (V)
62
63#define RIDBIT_SET(N, V) do { (V) |= RIDBIT_OF (N); } while (0)
64#define RIDBIT_RESET(N, V) do { (V) &= ~RIDBIT_OF (N); } while (0)
65#define RIDBIT_RESET_ALL(V) do { (V) = 0; } while (0)
66#endif
8d08fdba 67
88657302 68#endif /* ! GCC_CP_LEX_H */
This page took 1.120883 seconds and 5 git commands to generate.