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