#include <stdlib.h>
#include <unistd.h>
#include "safe-ctype.h"
#include <errno.h>
#include <stdarg.h>
#include <limits.h>
#include <string.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include "config.h"
#include "ansidecl.h"
#include "system.h"
#include "tree.h"
#include "flags.h"
#include "output.h"
#include "c-tree.h"
#include "rtl.h"
#include "ggc.h"
#include "toplev.h"
#include "varray.h"
#include "langhooks-def.h"
#include "langhooks.h"
#include "treelang.h"
#include "treetree.h"
extern int option_main;
extern char **file_names;
#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_SIGNED_TYPE
#define LANG_HOOKS_SIGNED_TYPE c_common_signed_type
#undef LANG_HOOKS_UNSIGNED_TYPE
#define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type
#undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
#define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type
#undef LANG_HOOKS_TYPE_FOR_MODE
#define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
#undef LANG_HOOKS_TYPE_FOR_SIZE
#define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE treelang_parse_file
#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
#define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
#undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
#define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
#undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES
#define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT treelang_init
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU treelang"
#undef LANG_HOOKS_FINISH
#define LANG_HOOKS_FINISH treelang_finish
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION treelang_decode_option
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
const char tree_code_type[] = {
#include "tree.def"
'x'
};
#undef DEFTREECODE
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
const unsigned char tree_code_length[] = {
#include "tree.def"
0
};
#undef DEFTREECODE
#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
const char *const tree_code_name[] = {
#include "tree.def"
"@@dummy"
};
#undef DEFTREECODE
unsigned int tree_code_int_size = 0;
unsigned int tree_code_char_size = 0;
tree
tree_code_get_type (int type_num)
{
switch (type_num)
{
case SIGNED_CHAR:
return signed_char_type_node;
case UNSIGNED_CHAR:
return unsigned_char_type_node;
case SIGNED_INT:
return integer_type_node;
case UNSIGNED_INT:
return unsigned_type_node;
case VOID_TYPE:
return void_type_node;
default:
abort ();
}
}
void
tree_code_if_start (tree exp, unsigned char* filename, int lineno)
{
tree cond_exp;
cond_exp = build (NE_EXPR,
TREE_TYPE (exp),
exp,
build1 (CONVERT_EXPR, TREE_TYPE (exp), integer_zero_node));
emit_line_note ((const char *)filename, lineno);
expand_start_cond (cond_exp, 0);
}
void
tree_code_if_else (unsigned char* filename, int lineno)
{
emit_line_note ((const char *)filename, lineno);
expand_start_else ();
}
void
tree_code_if_end (unsigned char* filename, int lineno)
{
emit_line_note ((const char *)filename, lineno);
expand_end_cond (NULL_TREE);
}
tree
tree_code_create_function_prototype (unsigned char* chars,
unsigned int storage_class,
unsigned int ret_type,
struct prod_token_parm_item* parms,
unsigned char* filename,
int lineno)
{
tree id;
struct prod_token_parm_item* parm;
tree type_list = NULL_TREE;
tree type_node;
tree fn_type;
tree fn_decl;
id = get_identifier ((const char*)chars);
for (parm = parms; parm; parm = parm->tp.par.next)
{
type_node = get_type_for_numeric_type (parm->type);
type_list = tree_cons (NULL_TREE, type_node, type_list);
}
type_list = tree_cons (NULL_TREE, void_type_node, type_list);
type_list = nreverse (type_list);
type_node = get_type_for_numeric_type (ret_type);
fn_type = build_function_type (type_node, type_list);
id = get_identifier ((const char*)chars);
fn_decl = build_decl (FUNCTION_DECL, id, fn_type);
DECL_CONTEXT (fn_decl) = NULL_TREE;
DECL_SOURCE_FILE (fn_decl) = (const char *)filename;
DECL_SOURCE_LINE (fn_decl) = lineno;
TREE_USED (fn_decl) = 1;
SET_DECL_ASSEMBLER_NAME (fn_decl, DECL_NAME (fn_decl));
TREE_PUBLIC (fn_decl) = 0;
DECL_EXTERNAL (fn_decl) = 0;
TREE_STATIC (fn_decl) = 0;
switch (storage_class)
{
case STATIC_STORAGE:
TREE_PUBLIC (fn_decl) = 0;
break;
case EXTERNAL_DEFINITION_STORAGE:
TREE_PUBLIC (fn_decl) = 1;
TREE_STATIC (fn_decl) = 0;
DECL_EXTERNAL (fn_decl) = 0;
break;
case EXTERNAL_REFERENCE_STORAGE:
TREE_PUBLIC (fn_decl) = 0;
DECL_EXTERNAL (fn_decl) = 1;
break;
case AUTOMATIC_STORAGE:
default:
abort ();
}
rest_of_decl_compilation (fn_decl, NULL, 1, 0);
return fn_decl;
}
void
tree_code_create_function_initial (tree prev_saved,
unsigned char* filename,
int lineno,
struct prod_token_parm_item* parms)
{
tree fn_decl;
tree param_decl;
tree next_param;
tree first_param;
tree parm_decl;
tree parm_list;
tree resultdecl;
struct prod_token_parm_item* this_parm;
struct prod_token_parm_item* parm;
fn_decl = prev_saved;
if (!fn_decl)
abort ();
announce_function (fn_decl);
pushdecl (fn_decl);
current_function_decl = fn_decl;
DECL_INITIAL (fn_decl) = error_mark_node;
DECL_SOURCE_FILE (fn_decl) = (const char *)filename;
DECL_SOURCE_LINE (fn_decl) = lineno;
resultdecl = DECL_RESULT (fn_decl) = build_decl (RESULT_DECL, NULL_TREE, TREE_TYPE (TREE_TYPE (fn_decl)));
DECL_CONTEXT (DECL_RESULT (fn_decl)) = fn_decl;
DECL_SOURCE_FILE (resultdecl) = (const char *)filename;
DECL_SOURCE_LINE (resultdecl) = lineno;
layout_decl (DECL_RESULT (fn_decl), 0);
parm_list = NULL_TREE;
for (parm = parms; parm; parm = parm->tp.par.next)
{
parm_decl = build_decl (PARM_DECL, get_identifier
((const char*) (parm->tp.par.variable_name)),
get_type_for_numeric_type (parm->type));
DECL_ARG_TYPE (parm_decl) = TREE_TYPE (parm_decl);
if (!DECL_ARG_TYPE (parm_decl))
abort ();
if (!fn_decl)
abort ();
DECL_CONTEXT (parm_decl) = fn_decl;
DECL_SOURCE_FILE (parm_decl) = (const char *)filename;
DECL_SOURCE_LINE (parm_decl) = lineno;
parm_list = chainon (parm_decl, parm_list);
}
parm_list = nreverse (parm_list);
DECL_ARGUMENTS (fn_decl) = parm_list;
for (param_decl = DECL_ARGUMENTS (fn_decl),
this_parm = parms;
param_decl;
param_decl = TREE_CHAIN (param_decl),
this_parm = this_parm->tp.par.next)
{
if (!this_parm)
abort ();
*this_parm->tp.par.where_to_put_var_tree = param_decl;
}
if (this_parm)
abort ();
make_decl_rtl (fn_decl, NULL);
init_function_start (fn_decl, (const char *)filename, lineno);
expand_function_start (fn_decl, 0);
(*lang_hooks.decls.pushlevel) (0);
expand_start_bindings (2);
for (first_param = param_decl = nreverse (DECL_ARGUMENTS (fn_decl));
param_decl;
param_decl = next_param)
{
next_param = TREE_CHAIN (param_decl);
TREE_CHAIN (param_decl) = NULL;
pushdecl (param_decl);
if (DECL_CONTEXT (param_decl) != current_function_decl)
abort ();
}
DECL_ARGUMENTS (fn_decl) = getdecls ();
TREE_ADDRESSABLE (fn_decl) = 1;
TREE_USED (fn_decl) = 1;
(*lang_hooks.decls.pushlevel) (0);
expand_start_bindings (0);
emit_line_note ((const char *)filename, lineno);
}
void
tree_code_create_function_wrapup (unsigned char* filename,
int lineno)
{
tree block;
tree fn_decl;
fn_decl = current_function_decl;
emit_line_note ((const char *)filename, lineno);
block = (*lang_hooks.decls.poplevel) (1, 0, 0);
expand_end_bindings (block, 0, 1);
expand_function_end ((const char *)filename, lineno, 0, fn_decl);
block = (*lang_hooks.decls.poplevel) (1, 0, 1);
DECL_INITIAL (fn_decl) = block;
expand_end_bindings (block, 0, 1);
rest_of_compilation (fn_decl);
current_function_decl = NULL_TREE;
}
tree
tree_code_create_variable (unsigned int storage_class,
unsigned char* chars,
unsigned int length,
unsigned int expression_type,
tree init,
unsigned char* filename,
int lineno)
{
tree var_type;
tree var_id;
tree var_decl;
var_type = get_type_for_numeric_type (expression_type);
if (chars[length] != 0)
abort ();
var_id = get_identifier ((const char*)chars);
var_decl = build_decl (VAR_DECL, var_id, var_type);
if (init)
DECL_INITIAL (var_decl) = build1 (CONVERT_EXPR, var_type, init);
else
DECL_INITIAL (var_decl) = NULL_TREE;
layout_decl (var_decl, 0);
if (TYPE_SIZE (var_type) == 0)
abort ();
DECL_CONTEXT (var_decl) = current_function_decl;
DECL_SOURCE_FILE (var_decl) = (const char *)filename;
DECL_SOURCE_LINE (var_decl) = lineno;
switch (storage_class)
{
case STATIC_STORAGE:
TREE_STATIC (var_decl) = 1;
TREE_PUBLIC (var_decl) = 0;
break;
case AUTOMATIC_STORAGE:
TREE_STATIC (var_decl) = 0;
TREE_PUBLIC (var_decl) = 0;
break;
case EXTERNAL_DEFINITION_STORAGE:
TREE_STATIC (var_decl) = 0;
TREE_PUBLIC (var_decl) = 1;
break;
case EXTERNAL_REFERENCE_STORAGE:
DECL_EXTERNAL (var_decl) = 1;
TREE_PUBLIC (var_decl) = 0;
break;
default:
abort ();
}
TREE_USED (var_decl) = 1;
if (TREE_STATIC (var_decl))
rest_of_decl_compilation (var_decl, 0, 0, 0);
else
{
expand_decl (var_decl);
if (DECL_INITIAL (var_decl))
expand_decl_init (var_decl);
}
return pushdecl (copy_node (var_decl));
}
void
tree_code_generate_return (tree type, tree exp)
{
tree setret;
tree param;
for (param = DECL_ARGUMENTS (current_function_decl);
param;
param = TREE_CHAIN (param))
{
if (DECL_CONTEXT (param) != current_function_decl)
abort ();
}
if (exp)
{
setret = build (MODIFY_EXPR, type, DECL_RESULT (current_function_decl),
build1 (CONVERT_EXPR, type, exp));
TREE_SIDE_EFFECTS (setret) = 1;
TREE_USED (setret) = 1;
expand_expr_stmt (setret);
}
expand_return (DECL_RESULT (current_function_decl));
}
void
tree_code_output_expression_statement (tree code,
unsigned char* filename, int lineno)
{
emit_line_note ((const char *)filename, lineno);
TREE_USED (code) = 1;
TREE_SIDE_EFFECTS (code) = 1;
expand_expr_stmt (code);
}
tree
tree_code_get_integer_value (unsigned char* chars, unsigned int length)
{
long long int val = 0;
unsigned int ix;
unsigned int start = 0;
int negative = 1;
switch (chars[0])
{
case (unsigned char)'-':
negative = -1;
start = 1;
break;
case (unsigned char)'+':
start = 1;
break;
default:
break;
}
for (ix = start; ix < length; ix++)
val = val * 10 + chars[ix] - (unsigned char)'0';
val = val*negative;
return build_int_2 (val & 0xffffffff, (val >> 32) & 0xffffffff);
}
tree
tree_code_get_expression (unsigned int exp_type,
tree type, tree op1, tree op2, tree op3 ATTRIBUTE_UNUSED)
{
tree ret1;
int operator;
switch (exp_type)
{
case EXP_ASSIGN:
if (!op1 || !op2)
abort ();
operator = MODIFY_EXPR;
ret1 = build (operator, type,
op1,
build1 (CONVERT_EXPR, type, op2));
break;
case EXP_PLUS:
operator = PLUS_EXPR;
goto binary_expression;
case EXP_MINUS:
operator = MINUS_EXPR;
goto binary_expression;
case EXP_EQUALS:
operator = EQ_EXPR;
goto binary_expression;
binary_expression:
if (!op1 || !op2)
abort ();
ret1 = build (operator, type,
build1 (CONVERT_EXPR, type, op1),
build1 (CONVERT_EXPR, type, op2));
break;
case EXP_REFERENCE:
if (!op1)
abort ();
if (type == TREE_TYPE (op1))
ret1 = op1;
else
ret1 = build1 (CONVERT_EXPR, type, op1);
break;
case EXP_FUNCTION_INVOCATION:
if (!op1 || !op2)
abort ();
{
tree fun_ptr;
fun_ptr = build1 (ADDR_EXPR, build_pointer_type (type), op1);
ret1 = build (CALL_EXPR, type, fun_ptr, nreverse (op2));
}
break;
default:
abort ();
}
return ret1;
}
tree
tree_code_init_parameters (void)
{
return NULL_TREE;
}
tree
tree_code_add_parameter (tree list, tree proto_exp, tree exp)
{
tree new_exp;
new_exp = tree_cons (NULL_TREE,
build1 (CONVERT_EXPR, TREE_TYPE (proto_exp), exp),
NULL_TREE);
if (!list)
return new_exp;
return chainon (new_exp, list);
}
tree
get_type_for_numeric_type (unsigned int numeric_type)
{
int size1;
int sign1;
switch (numeric_type)
{
case VOID_TYPE:
return void_type_node;
case SIGNED_INT:
size1 = tree_code_int_size;
sign1 = 1;
break;
case UNSIGNED_INT:
size1 = tree_code_int_size;
sign1 = 0;
break;
case SIGNED_CHAR:
size1 = tree_code_char_size;
sign1 = 1;
break;
case UNSIGNED_CHAR:
size1 = tree_code_char_size;
sign1 = 0;
break;
default:
abort ();
}
return tree_code_get_numeric_type (size1, sign1);
}
tree
tree_code_get_numeric_type (unsigned int size1, unsigned int sign1)
{
tree ret1;
if (size1 == tree_code_int_size)
{
if (sign1)
ret1 = integer_type_node;
else
ret1 = unsigned_type_node;
}
else
if (size1 == tree_code_char_size)
{
if (sign1)
ret1 = signed_char_type_node;
else
ret1 = unsigned_char_type_node;
}
else
abort ();
return ret1;
}
void
tree_ggc_storage_always_used (void * m)
{
void **mm;
mm = (void**)m;
if (*mm)
ggc_mark (*mm);
}
tree
lookup_objc_ivar (tree id ATTRIBUTE_UNUSED)
{
return 0;
}
tree
objc_is_id (tree arg ATTRIBUTE_UNUSED)
{
return 0;
}
void
check_function_format (int *status ATTRIBUTE_UNUSED,
tree attrs ATTRIBUTE_UNUSED,
tree params ATTRIBUTE_UNUSED)
{
return;
}
int
objc_comptypes (tree lhs ATTRIBUTE_UNUSED,
tree rhs ATTRIBUTE_UNUSED,
int reflexive ATTRIBUTE_UNUSED)
{
return 0;
}
tree
build_stmt VPARAMS ((enum tree_code code ATTRIBUTE_UNUSED, ...))
{
abort ();
}
tree
add_stmt (tree t ATTRIBUTE_UNUSED)
{
abort ();
}
tree
build_return_stmt (tree expr ATTRIBUTE_UNUSED)
{
abort ();
}
void
pedwarn_c99 VPARAMS ((const char *msgid ATTRIBUTE_UNUSED, ...))
{
return;
}
tree
build_case_label (tree low_value ATTRIBUTE_UNUSED,
tree high_value ATTRIBUTE_UNUSED,
tree label_decl ATTRIBUTE_UNUSED)
{
abort ();
}
void
emit_local_var (tree decl ATTRIBUTE_UNUSED)
{
abort ();
}
void
expand_stmt (tree t ATTRIBUTE_UNUSED)
{
abort ();
}
cpp_reader *
cpp_create_reader (enum c_lang lang ATTRIBUTE_UNUSED)
{
abort ();
}
const char *
init_c_lex (const char *filename ATTRIBUTE_UNUSED)
{
abort ();
}
void init_pragma (void);
void
init_pragma ()
{
abort ();
}
int
cpp_finish (cpp_reader *pfile ATTRIBUTE_UNUSED, FILE *f ATTRIBUTE_UNUSED)
{
abort ();
}
unsigned int
cpp_errors (cpp_reader *pfile ATTRIBUTE_UNUSED)
{
abort ();
}
tree
handle_format_attribute (tree *node ATTRIBUTE_UNUSED,
tree name ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED,
bool *no_add_attrs ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
tree
handle_format_arg_attribute (tree *node ATTRIBUTE_UNUSED,
tree name ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED,
bool *no_add_attrs ATTRIBUTE_UNUSED)
{
abort ();
}
int
cpp_handle_option (cpp_reader *pfile ATTRIBUTE_UNUSED,
int argc ATTRIBUTE_UNUSED,
char **argv ATTRIBUTE_UNUSED)
{
abort ();
}
void
cpp_assert (cpp_reader * cr ATTRIBUTE_UNUSED,
const char *s ATTRIBUTE_UNUSED)
{
abort ();
}
void
set_Wformat (int setting ATTRIBUTE_UNUSED)
{
abort ();
}
void
objc_check_decl (tree decl ATTRIBUTE_UNUSED);
void
objc_check_decl (tree decl ATTRIBUTE_UNUSED)
{
abort ();
}
tree
objc_message_selector (void);
tree
objc_message_selector ()
{
return 0;
}
void
gen_aux_info_record (tree fndecl ATTRIBUTE_UNUSED,
int is_definition ATTRIBUTE_UNUSED,
int is_implicit ATTRIBUTE_UNUSED,
int is_prototyped ATTRIBUTE_UNUSED)
{
abort ();
}
void
c_parse_init ()
{
return;
}
void maybe_apply_pragma_weak (tree decl);
void
maybe_apply_pragma_weak (tree decl ATTRIBUTE_UNUSED)
{
abort ();
}
void
add_decl_stmt (tree decl ATTRIBUTE_UNUSED)
{
abort ();
}
tree
maybe_apply_renaming_pragma (tree decl, tree asmname);
tree
maybe_apply_renaming_pragma (tree decl ATTRIBUTE_UNUSED, tree asmname ATTRIBUTE_UNUSED)
{
abort ();
}
void
begin_stmt_tree (tree *t ATTRIBUTE_UNUSED)
{
abort ();
}
void
finish_stmt_tree (tree *t ATTRIBUTE_UNUSED)
{
abort ();
}
int
defer_fn (tree fn ATTRIBUTE_UNUSED)
{
abort ();
}
cpp_options
*cpp_get_options (cpp_reader * cr ATTRIBUTE_UNUSED)
{
abort ();
}
void
cpp_define (cpp_reader * cr ATTRIBUTE_UNUSED, const char * c ATTRIBUTE_UNUSED)
{
abort ();
}
cpp_callbacks *
cpp_get_callbacks (cpp_reader * cr ATTRIBUTE_UNUSED)
{
abort ();
}
struct resword
{
const char *word;
ENUM_BITFIELD(rid) rid : 16;
unsigned int disable : 16;
};
static const struct resword reswords[] =
{
{ "_Bool", RID_BOOL, 0 },
{ "_Complex", RID_COMPLEX, 0 },
{ "__FUNCTION__", RID_FUNCTION_NAME, 0 },
{ "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 },
{ "__alignof", RID_ALIGNOF, 0 },
{ "__alignof__", RID_ALIGNOF, 0 },
{ "__asm", RID_ASM, 0 },
{ "__asm__", RID_ASM, 0 },
{ "__attribute", RID_ATTRIBUTE, 0 },
{ "__attribute__", RID_ATTRIBUTE, 0 },
{ "__bounded", RID_BOUNDED, 0 },
{ "__bounded__", RID_BOUNDED, 0 },
{ "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 },
{ "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 },
{ "__builtin_va_arg", RID_VA_ARG, 0 },
{ "__complex", RID_COMPLEX, 0 },
{ "__complex__", RID_COMPLEX, 0 },
{ "__const", RID_CONST, 0 },
{ "__const__", RID_CONST, 0 },
{ "__extension__", RID_EXTENSION, 0 },
{ "__func__", RID_C99_FUNCTION_NAME, 0 },
{ "__imag", RID_IMAGPART, 0 },
{ "__imag__", RID_IMAGPART, 0 },
{ "__inline", RID_INLINE, 0 },
{ "__inline__", RID_INLINE, 0 },
{ "__label__", RID_LABEL, 0 },
{ "__ptrbase", RID_PTRBASE, 0 },
{ "__ptrbase__", RID_PTRBASE, 0 },
{ "__ptrextent", RID_PTREXTENT, 0 },
{ "__ptrextent__", RID_PTREXTENT, 0 },
{ "__ptrvalue", RID_PTRVALUE, 0 },
{ "__ptrvalue__", RID_PTRVALUE, 0 },
{ "__real", RID_REALPART, 0 },
{ "__real__", RID_REALPART, 0 },
{ "__restrict", RID_RESTRICT, 0 },
{ "__restrict__", RID_RESTRICT, 0 },
{ "__signed", RID_SIGNED, 0 },
{ "__signed__", RID_SIGNED, 0 },
{ "__typeof", RID_TYPEOF, 0 },
{ "__typeof__", RID_TYPEOF, 0 },
{ "__unbounded", RID_UNBOUNDED, 0 },
{ "__unbounded__", RID_UNBOUNDED, 0 },
{ "__volatile", RID_VOLATILE, 0 },
{ "__volatile__", RID_VOLATILE, 0 },
{ "asm", RID_ASM, 0 },
{ "auto", RID_AUTO, 0 },
{ "break", RID_BREAK, 0 },
{ "case", RID_CASE, 0 },
{ "char", RID_CHAR, 0 },
{ "const", RID_CONST, 0 },
{ "continue", RID_CONTINUE, 0 },
{ "default", RID_DEFAULT, 0 },
{ "do", RID_DO, 0 },
{ "double", RID_DOUBLE, 0 },
{ "else", RID_ELSE, 0 },
{ "enum", RID_ENUM, 0 },
{ "extern", RID_EXTERN, 0 },
{ "float", RID_FLOAT, 0 },
{ "for", RID_FOR, 0 },
{ "goto", RID_GOTO, 0 },
{ "if", RID_IF, 0 },
{ "inline", RID_INLINE, 0 },
{ "int", RID_INT, 0 },
{ "long", RID_LONG, 0 },
{ "register", RID_REGISTER, 0 },
{ "restrict", RID_RESTRICT, 0 },
{ "return", RID_RETURN, 0 },
{ "short", RID_SHORT, 0 },
{ "signed", RID_SIGNED, 0 },
{ "sizeof", RID_SIZEOF, 0 },
{ "static", RID_STATIC, 0 },
{ "struct", RID_STRUCT, 0 },
{ "switch", RID_SWITCH, 0 },
{ "typedef", RID_TYPEDEF, 0 },
{ "typeof", RID_TYPEOF, 0 },
{ "union", RID_UNION, 0 },
{ "unsigned", RID_UNSIGNED, 0 },
{ "void", RID_VOID, 0 },
{ "volatile", RID_VOLATILE, 0 },
{ "while", RID_WHILE, 0 },
};
#define N_reswords (sizeof reswords / sizeof (struct resword))
void
treelang_init_decl_processing ()
{
unsigned int i;
tree id;
ridpointers = (tree *) xcalloc ((int) RID_MAX, sizeof (tree));
for (i = 0; i < N_reswords; i++)
{
id = get_identifier (reswords[i].word);
C_RID_CODE (id) = reswords[i].rid;
C_IS_RESERVED_WORD (id) = 1;
ridpointers [(int) reswords[i].rid] = id;
}
c_init_decl_processing ();
for (i = 0; i < itk_none; i++)
{
if (integer_types[i])
TREE_TYPE (integer_types [i]) = integer_types[i];
}
TREE_TYPE (float_type_node) = float_type_node;
TREE_TYPE (double_type_node) = double_type_node;
TREE_TYPE (long_double_type_node) = long_double_type_node;
}
void dt (tree t);
void
dt (tree t)
{
debug_tree (t);
}