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