00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "config.h"
00028 #include "system.h"
00029 #ifdef SGI_MONGOOSE
00030
00031 #include "rtl.h"
00032 #endif
00033 #include "tree.h"
00034 #include "c-tree.h"
00035 #include "c-common.h"
00036 #include "ggc.h"
00037 #include "langhooks.h"
00038 #include "langhooks-def.h"
00039
00040 static void c_init_options PARAMS ((void));
00041
00042
00043
00044 #undef LANG_HOOKS_NAME
00045 #define LANG_HOOKS_NAME "GNU C"
00046 #undef LANG_HOOKS_INIT
00047 #define LANG_HOOKS_INIT c_objc_common_init
00048 #undef LANG_HOOKS_FINISH
00049 #define LANG_HOOKS_FINISH c_common_finish
00050 #undef LANG_HOOKS_INIT_OPTIONS
00051 #define LANG_HOOKS_INIT_OPTIONS c_init_options
00052 #undef LANG_HOOKS_DECODE_OPTION
00053 #define LANG_HOOKS_DECODE_OPTION c_common_decode_option
00054 #undef LANG_HOOKS_POST_OPTIONS
00055 #define LANG_HOOKS_POST_OPTIONS c_common_post_options
00056 #undef LANG_HOOKS_GET_ALIAS_SET
00057 #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
00058 #undef LANG_HOOKS_SAFE_FROM_P
00059 #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
00060 #undef LANG_HOOKS_EXPAND_EXPR
00061 #define LANG_HOOKS_EXPAND_EXPR c_expand_expr
00062 #undef LANG_HOOKS_MARK_ADDRESSABLE
00063 #define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
00064 #undef LANG_HOOKS_PARSE_FILE
00065 #define LANG_HOOKS_PARSE_FILE c_common_parse_file
00066 #undef LANG_HOOKS_TRUTHVALUE_CONVERSION
00067 #define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
00068 #undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES
00069 #define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes
00070 #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
00071 #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
00072 #undef LANG_HOOKS_UNSAFE_FOR_REEVAL
00073 #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval
00074 #undef LANG_HOOKS_STATICP
00075 #define LANG_HOOKS_STATICP c_staticp
00076 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
00077 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl
00078 #undef LANG_HOOKS_PRINT_IDENTIFIER
00079 #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
00080 #undef LANG_HOOKS_FUNCTION_ENTER_NESTED
00081 #define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context
00082 #undef LANG_HOOKS_FUNCTION_LEAVE_NESTED
00083 #define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context
00084 #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
00085 #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
00086
00087
00088 #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
00089 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
00090 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
00091 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
00092
00093 #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
00094 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
00095 c_cannot_inline_tree_fn
00096 #undef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS
00097 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
00098 c_disregard_inline_limits
00099 #undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
00100 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
00101 anon_aggr_type_p
00102 #undef LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING
00103 #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
00104 c_convert_parm_for_inlining
00105 #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
00106 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN c_dump_tree
00107
00108 #undef LANG_HOOKS_TYPE_FOR_MODE
00109 #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
00110 #undef LANG_HOOKS_TYPE_FOR_SIZE
00111 #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
00112 #undef LANG_HOOKS_SIGNED_TYPE
00113 #define LANG_HOOKS_SIGNED_TYPE c_common_signed_type
00114 #undef LANG_HOOKS_UNSIGNED_TYPE
00115 #define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type
00116 #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
00117 #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type
00118 #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
00119 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR c_incomplete_type_error
00120 #undef LANG_HOOKS_TYPE_PROMOTES_TO
00121 #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to
00122
00123
00124
00125
00126 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
00127
00128
00129
00130 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
00131
00132 const char tree_code_type[] = {
00133 #include "tree.def"
00134 'x',
00135 #include "c-common.def"
00136 };
00137 #undef DEFTREECODE
00138
00139
00140
00141
00142
00143 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
00144
00145 const unsigned char tree_code_length[] = {
00146 #include "tree.def"
00147 0,
00148 #include "c-common.def"
00149 };
00150 #undef DEFTREECODE
00151
00152
00153
00154 #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
00155
00156 const char *const tree_code_name[] = {
00157 #include "tree.def"
00158 "@@dummy",
00159 #include "c-common.def"
00160 };
00161 #undef DEFTREECODE
00162
00163 static void
00164 c_init_options ()
00165 {
00166 c_common_init_options (clk_c);
00167 }
00168
00169
00170
00171 tree
00172 lookup_interface (arg)
00173 tree arg ATTRIBUTE_UNUSED;
00174 {
00175 return 0;
00176 }
00177
00178 tree
00179 is_class_name (arg)
00180 tree arg ATTRIBUTE_UNUSED;
00181 {
00182 return 0;
00183 }
00184
00185 tree
00186 objc_is_id (arg)
00187 tree arg ATTRIBUTE_UNUSED;
00188 {
00189 return 0;
00190 }
00191
00192 void
00193 objc_check_decl (decl)
00194 tree decl ATTRIBUTE_UNUSED;
00195 {
00196 }
00197
00198 int
00199 objc_comptypes (lhs, rhs, reflexive)
00200 tree lhs ATTRIBUTE_UNUSED;
00201 tree rhs ATTRIBUTE_UNUSED;
00202 int reflexive ATTRIBUTE_UNUSED;
00203 {
00204 return -1;
00205 }
00206
00207 tree
00208 objc_message_selector ()
00209 {
00210 return 0;
00211 }
00212
00213
00214
00215 tree
00216 lookup_objc_ivar (id)
00217 tree id ATTRIBUTE_UNUSED;
00218 {
00219 return 0;
00220 }
00221
00222 void
00223 finish_file ()
00224 {
00225 c_objc_common_finish_file ();
00226 }
00227
00228 #include "gtype-c.h"