/* Front-end tree definitions for GNU compiler.
Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
expression. */
#define IS_EXPR_CODE_CLASS(CLASS)\
- (((CLASS) - tcc_reference) <= (tcc_expression - tcc_reference))
+ ((CLASS) >= tcc_reference && (CLASS) <= tcc_expression)
/* Returns nonzero iff NODE is an expression of some kind. */
had its address taken. That matters for inline functions. */
#define TREE_ADDRESSABLE(NODE) ((NODE)->common.addressable_flag)
+/* Set on a CALL_EXPR if the call is in a tail position, ie. just before the
+ exit of a function. Calls for which this is true are candidates for tail
+ call optimizations. */
#define CALL_EXPR_TAILCALL(NODE) (CALL_EXPR_CHECK(NODE)->common.addressable_flag)
/* In a VAR_DECL, nonzero means allocate static storage.
/* Nonzero in a _DECL if the name is used in its scope.
Nonzero in an expr node means inhibit warning if value is unused.
In IDENTIFIER_NODEs, this means that some extern decl for this name
- was used. */
+ was used.
+ In a BLOCK, this means that the block contains variables that are used. */
#define TREE_USED(NODE) ((NODE)->common.used_flag)
/* In a FUNCTION_DECL, nonzero means a call to the function cannot throw
/* SWITCH_EXPR accessors. These give access to the condition, body and
original condition type (before any compiler conversions)
of the switch statement, respectively. */
-#define SWITCH_COND(NODE) TREE_OPERAND ((NODE), 0)
-#define SWITCH_BODY(NODE) TREE_OPERAND ((NODE), 1)
-#define SWITCH_LABELS(NODE) TREE_OPERAND ((NODE), 2)
+#define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 0)
+#define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 1)
+#define SWITCH_LABELS(NODE) TREE_OPERAND (SWITCH_EXPR_CHECK (NODE), 2)
/* CASE_LABEL_EXPR accessors. These give access to the high and low values
of a case label, respectively. */
-#define CASE_LOW(NODE) TREE_OPERAND ((NODE), 0)
-#define CASE_HIGH(NODE) TREE_OPERAND ((NODE), 1)
-#define CASE_LABEL(NODE) TREE_OPERAND ((NODE), 2)
+#define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 0)
+#define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1)
+#define CASE_LABEL(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 2)
/* The operands of a BIND_EXPR. */
#define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
statement. */
-#define ASM_STRING(NODE) TREE_OPERAND ((NODE), 0)
-#define ASM_OUTPUTS(NODE) TREE_OPERAND ((NODE), 1)
-#define ASM_INPUTS(NODE) TREE_OPERAND ((NODE), 2)
-#define ASM_CLOBBERS(NODE) TREE_OPERAND ((NODE), 3)
+#define ASM_STRING(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 0)
+#define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 1)
+#define ASM_INPUTS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 2)
+#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_EXPR_CHECK (NODE), 3)
/* Nonzero if we want to create an ASM_INPUT instead of an
ASM_OPERAND with no operands. */
#define ASM_INPUT_P(NODE) (TREE_STATIC (NODE))
extern tree merge_decl_attributes (tree, tree);
extern tree merge_type_attributes (tree, tree);
-extern void default_register_cpp_builtins (struct cpp_reader *);
/* Given a tree node and a string, return nonzero if the tree node is
a valid attribute name for the string. */
extern bool initializer_zerop (tree);
-extern void categorize_ctor_elements (tree, HOST_WIDE_INT *,
- HOST_WIDE_INT *, HOST_WIDE_INT *);
+extern void categorize_ctor_elements (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
+ HOST_WIDE_INT *, bool *);
extern HOST_WIDE_INT count_type_elements (tree);
/* add_var_to_bind_expr (bind_expr, var) binds var to bind_expr. */
extern int type_num_arguments (tree);
extern bool associative_tree_code (enum tree_code);
extern bool commutative_tree_code (enum tree_code);
-extern tree get_case_label (tree);
extern tree upper_bound_in_type (tree, tree);
extern tree lower_bound_in_type (tree, tree);
extern int operand_equal_for_phi_arg_p (tree, tree);
data structures from the inliner. */
extern tree unsave_expr_now (tree);
-/* In expr.c */
-extern void check_max_integer_computation_mode (tree);
-
/* In emit-rtl.c */
extern rtx emit_line_note (location_t);
extern void notice_global_symbol (tree);
extern void set_user_assembler_name (tree, const char *);
extern void process_pending_assemble_externals (void);
+extern void process_pending_assemble_output_defs (void);
/* In stmt.c */
extern void expand_computed_goto (tree);