xref: /dragonfly/contrib/gcc-8.0/gcc/cp/decl.h (revision 38fd1498)
1*38fd1498Szrj /* Variables and structures for declaration processing.
2*38fd1498Szrj    Copyright (C) 1993-2018 Free Software Foundation, Inc.
3*38fd1498Szrj 
4*38fd1498Szrj This file is part of GCC.
5*38fd1498Szrj 
6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify
7*38fd1498Szrj it under the terms of the GNU General Public License as published by
8*38fd1498Szrj the Free Software Foundation; either version 3, or (at your option)
9*38fd1498Szrj any later version.
10*38fd1498Szrj 
11*38fd1498Szrj GCC is distributed in the hope that it will be useful,
12*38fd1498Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of
13*38fd1498Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*38fd1498Szrj GNU General Public License for more details.
15*38fd1498Szrj 
16*38fd1498Szrj You should have received a copy of the GNU General Public License
17*38fd1498Szrj along with GCC; see the file COPYING3.  If not see
18*38fd1498Szrj <http://www.gnu.org/licenses/>.  */
19*38fd1498Szrj 
20*38fd1498Szrj /* In grokdeclarator, distinguish syntactic contexts of declarators.  */
21*38fd1498Szrj enum decl_context
22*38fd1498Szrj { NORMAL,			/* Ordinary declaration */
23*38fd1498Szrj   FUNCDEF,			/* Function definition */
24*38fd1498Szrj   PARM,				/* Declaration of parm before function body */
25*38fd1498Szrj   TPARM,                        /* Declaration of template parm */
26*38fd1498Szrj   CATCHPARM,			/* Declaration of catch parm */
27*38fd1498Szrj   FIELD,			/* Declaration inside struct or union */
28*38fd1498Szrj   BITFIELD,			/* Likewise but with specified width */
29*38fd1498Szrj   TYPENAME,			/* Typename (inside cast or sizeof)  */
30*38fd1498Szrj   TEMPLATE_TYPE_ARG,		/* Almost the same as TYPENAME  */
31*38fd1498Szrj   MEMFUNCDEF			/* Member function definition */
32*38fd1498Szrj };
33*38fd1498Szrj 
34*38fd1498Szrj /* We need this in here to get the decl_context definition.  */
35*38fd1498Szrj extern tree grokdeclarator (const cp_declarator *,
36*38fd1498Szrj 			    cp_decl_specifier_seq *,
37*38fd1498Szrj 			    enum decl_context, int, tree*);
38*38fd1498Szrj extern void name_unnamed_type (tree, tree);
39*38fd1498Szrj 
40*38fd1498Szrj /* States indicating how grokdeclarator() should handle declspecs marked
41*38fd1498Szrj    with __attribute__((deprecated)).  An object declared as
42*38fd1498Szrj    __attribute__((deprecated)) suppresses warnings of uses of other
43*38fd1498Szrj    deprecated items.  */
44*38fd1498Szrj 
45*38fd1498Szrj enum deprecated_states {
46*38fd1498Szrj   DEPRECATED_NORMAL,
47*38fd1498Szrj   DEPRECATED_SUPPRESS
48*38fd1498Szrj };
49*38fd1498Szrj 
50*38fd1498Szrj extern enum deprecated_states deprecated_state;
51*38fd1498Szrj 
52