xref: /dragonfly/contrib/gcc-8.0/gcc/c/c-lang.h (revision 38fd1498)
1*38fd1498Szrj /* Definitions for C language specific types.
2*38fd1498Szrj    Copyright (C) 2009-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 it under
7*38fd1498Szrj the terms of the GNU General Public License as published by the Free
8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later
9*38fd1498Szrj version.
10*38fd1498Szrj 
11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or
13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*38fd1498Szrj 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 #ifndef GCC_C_LANG_H
21*38fd1498Szrj #define GCC_C_LANG_H
22*38fd1498Szrj 
23*38fd1498Szrj #include "c-family/c-common.h"
24*38fd1498Szrj 
25*38fd1498Szrj /* In a RECORD_TYPE, a sorted array of the fields of the type, not a
26*38fd1498Szrj    tree for size reasons.  */
27*38fd1498Szrj struct GTY(()) sorted_fields_type {
28*38fd1498Szrj   int len;
29*38fd1498Szrj   tree GTY((length ("%h.len"))) elts[1];
30*38fd1498Szrj };
31*38fd1498Szrj 
32*38fd1498Szrj struct GTY(()) lang_type {
33*38fd1498Szrj   /* In a RECORD_TYPE, a sorted array of the fields of the type.  */
34*38fd1498Szrj   struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
35*38fd1498Szrj   /* In an ENUMERAL_TYPE, the min and max values.  */
36*38fd1498Szrj   tree enum_min;
37*38fd1498Szrj   tree enum_max;
38*38fd1498Szrj   /* In a RECORD_TYPE, information specific to Objective-C, such
39*38fd1498Szrj      as a list of adopted protocols or a pointer to a corresponding
40*38fd1498Szrj      @interface.  See objc/objc-act.h for details.  */
41*38fd1498Szrj   tree objc_info;
42*38fd1498Szrj };
43*38fd1498Szrj 
44*38fd1498Szrj struct GTY(()) lang_decl {
45*38fd1498Szrj   char dummy;
46*38fd1498Szrj };
47*38fd1498Szrj 
48*38fd1498Szrj /* Save and restore the variables in this file and elsewhere
49*38fd1498Szrj    that keep track of the progress of compilation of the current function.
50*38fd1498Szrj    Used for nested functions.  */
51*38fd1498Szrj 
52*38fd1498Szrj struct GTY(()) language_function {
53*38fd1498Szrj   struct c_language_function base;
54*38fd1498Szrj   tree x_break_label;
55*38fd1498Szrj   tree x_cont_label;
56*38fd1498Szrj   struct c_switch * GTY((skip)) x_switch_stack;
57*38fd1498Szrj   struct c_arg_info * GTY((skip)) arg_info;
58*38fd1498Szrj   int returns_value;
59*38fd1498Szrj   int returns_null;
60*38fd1498Szrj   int returns_abnormally;
61*38fd1498Szrj   int warn_about_return_type;
62*38fd1498Szrj };
63*38fd1498Szrj 
64*38fd1498Szrj /* If non-zero, implicit "omp declare target" attribute is added into the
65*38fd1498Szrj    attribute lists.  */
66*38fd1498Szrj extern GTY(()) int current_omp_declare_target_attribute;
67*38fd1498Szrj 
68*38fd1498Szrj #endif /* ! GCC_C_LANG_H */
69