c-common.h (IF_COND): Added documentation.
* c-common.h (IF_COND): Added documentation. (THEN_CLAUSE): Likewise. (ELSE_CLAUSE): Likewise. (WHILE_COND): Likewise. (WHILE_BODY): Likewise. (DO_COND): Likewise. (DO_BODY): Likewise. (RETURN_EXPR): Likewise. (EXPR_STMT_EXPR): Likewise. (FOR_INIT_STMT): Likewise. (FOR_COND): Likewise. (FOR_EXPR): Likewise. (FOR_BODY): Likewise. (SWITCH_COND): Likewise. (SWITCH_BODY): Likewise. (CASE_LOW): Likewise. (CASE_HIGH): Likewise. (GOTO_DESTINATION): Likewise. (COMPOUND_BODY): Likewise. (ASM_CV_QUAL): Likewise. (ASM_STRING): Likewise. (ASM_OUTPUTS): Likewise. (ASM_INPUTS): Likewise. (ASM_CLOBBERS): Likewise. (DECL_STMT_DECL): Likewise. (STMT_EXPR_STMT): Likewise. (LABEL_STMT_LABEL): Likewise. * c-common.def: Added documenetion for SRCLOC, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, SCOPE_STMT, CASE_LABEL, STMT_EXPR. * cp/cp-tree.h (genrtl_try_block): Declare function. (genrtl_handler): Likewise. (genrtl_catch_block): Likewise. (genrtl_ctor_stmt): Likewise. (genrtl_subobject): Likewise. (genrtl_decl_cleanup): Likewise. (genrtl_do_poplevel): Likewise. (genrtl_do_pushlevel): Likewise. (genrtl_clear_out_block): Likewise. (genrtl_goto_stmt): Likewise. (genrtl_expr_stmt): Likewise. (genrtl_decl_stmt): Likewise. (genrtl_if_stmt): Likewise. (genrtl_while_stmt): Likewise. (genrtl_do_stmt): Likewise. (genrtl_return_stmt): Likewise. (genrtl_for_stmt): Likewise. (genrtl_break_stmt): Likewise. (genrtl_continue_stmt): Likewise. (genrtl_scope_stmt): Likewise. (genrtl_switch_stmt): Likewise. (genrtl_case_label): Likewise. (genrtl_begin_compound_stmt): Likewise. (genrtl_finish_compound_stmt): Likewise. (genrtl_compound_stmt): Likewise. (genrtl_asm_stmt): Likewise. (genrtl_named_return_value): Likewise. (genrtl_begin_stmt_expr): Likewise. (genrtl_finish_stmt_expr): Likewise. (finish_for_stmt): Removed first argument. (finish_switch_stmt): Likewise. * cp/semantics.c (genrtl_try_block): Define function. (genrtl_handler): Likewise. (genrtl_catch_block): Likewise. (genrtl_ctor_stmt): Likewise. (genrtl_subobject): Likewise. (genrtl_decl_cleanup): Likewise. (genrtl_do_poplevel): Likewise. (genrtl_do_pushlevel): Likewise. (genrtl_clear_out_block): Likewise. (genrtl_goto_stmt): Likewise. (genrtl_expr_stmt): Likewise. (genrtl_decl_stmt): Likewise. (genrtl_if_stmt): Likewise. (genrtl_while_stmt): Likewise. (genrtl_do_stmt): Likewise. (genrtl_return_stmt): Likewise. (genrtl_for_stmt): Likewise. (genrtl_break_stmt): Likewise. (genrtl_continue_stmt): Likewise. (genrtl_scope_stmt): Likewise. (genrtl_switch_stmt): Likewise. (genrtl_case_label): Likewise. (genrtl_begin_compound_stmt): Likewise. (genrtl_finish_compound_stmt): Likewise. (genrtl_compound_stmt): Likewise. (genrtl_asm_stmt): Likewise. (genrtl_named_return_value): Likewise. (genrtl_begin_stmt_expr): Likewise. (genrtl_finish_stmt_expr): Likewise. (finish_for_stmt): Removed first argument and generate rtl specific code. (finish_switch_stmt): Likewise. (do_poplevel): Removed generate rtl specific code. (do_pushlevel): Likewise. (add_tree): Likewise. (finish_goto_stmt): Likewise. (finish_expr_stmt): Likewise. (begin_if_stmt): Likewise. (finish_if_stmt_cond): Likewise. (finish_then_clause): Likewise. (begin_else_clause): Likewise. (finish_else_clause): Likewise. (finish_if_stmt): Likewise. (clear_out_block): Likewise. (begin_while_stmt): Likewise. (finish_while_stmt_cond): Likewise. (finish_while_stmt): Likewise. (begin_do_stmt): Likewise. (finish_do_body): Likewise. (finish_do_stmt): Likewise. (finish_return_stmt): Likewise. (begin_for_stmt): Likewise. (finish_for_init_stmt): Likewise. (finish_for_cond): Likewise. (finish_for_expr): Likewise. (finish_break_stmt): Likewise. (finish_continue_stmt): Likewise. (begin_switch_stmt): Likewise. (finish_switch_cond): Likewise. (finish_case_label): Likewise. (begin_try_block): Likewise. (begin_function_try_block): Likewise. (finish_try_block): Likewise. (finish_cleanup_try_block): Likewise. (finish_cleanup): Likewise. (finish_function_try_block): Likewise. (finish_handler_sequence): Likewise. (finish_function_handler_sequence): Likewise. (begin_handler): Likewise. (finish_handler_parms): Likewise. (begin_catch_block): Likewise. (finish_handler): Likewise. (begin_compound_stmt): Likewise. (finish_compound_stmt): Likewise. (finish_asm_stmt): Likewise. (finish_label_stmt): Likewise. (finish_label_decl): Likewise. (finish_subobject): Likewise. (finish_decl_cleanup): Likewise. (finish_named_return_value): Likewise. (begin_stmt_expr): Likewise. (finish_stmt_expr): Likewise. * cp/decl.c (initialize_local_var): Changed call to finish_expr_stmt to call genrtl_expr_stmt when appropriate. * cp/init.c (begin_init_stmts): Changed calls to begin_stmt_expr and begin_compound_expr to call genrtl_begin_stmt_expr and genrtl_begin_compound_expr when appropriate. (finish_init_stmts): Changed calls to finish_compound_expr and finish_stmt_expr to call genrtl_finish_compound_expr and genrtl_finish_stmt_expr when appropriate. (expand_default_init): Changed call to finish_expr_stmt to call genrtl_expr_stmt when appropriate. (build_vec_init): Likewise. * cp/parse.y (simple_stmt): Removed first argument from call to finish_for_stmt. Removed first argument from call to finish_switch_stmt. * cp/parse.c: Regenerated. * cp/pt.c (tsubst_expr): Removed first argument from call to finish_for_stmt. Removed first argument from call to finish_switch_stmt. From-SVN: r34597
This commit is contained in:
parent
59f406b7a3
commit
35b1567d9e
11 changed files with 1228 additions and 721 deletions
|
@ -1,3 +1,38 @@
|
|||
2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
|
||||
|
||||
* c-common.h (IF_COND): Added documentation.
|
||||
(THEN_CLAUSE): Likewise.
|
||||
(ELSE_CLAUSE): Likewise.
|
||||
(WHILE_COND): Likewise.
|
||||
(WHILE_BODY): Likewise.
|
||||
(DO_COND): Likewise.
|
||||
(DO_BODY): Likewise.
|
||||
(RETURN_EXPR): Likewise.
|
||||
(EXPR_STMT_EXPR): Likewise.
|
||||
(FOR_INIT_STMT): Likewise.
|
||||
(FOR_COND): Likewise.
|
||||
(FOR_EXPR): Likewise.
|
||||
(FOR_BODY): Likewise.
|
||||
(SWITCH_COND): Likewise.
|
||||
(SWITCH_BODY): Likewise.
|
||||
(CASE_LOW): Likewise.
|
||||
(CASE_HIGH): Likewise.
|
||||
(GOTO_DESTINATION): Likewise.
|
||||
(COMPOUND_BODY): Likewise.
|
||||
(ASM_CV_QUAL): Likewise.
|
||||
(ASM_STRING): Likewise.
|
||||
(ASM_OUTPUTS): Likewise.
|
||||
(ASM_INPUTS): Likewise.
|
||||
(ASM_CLOBBERS): Likewise.
|
||||
(DECL_STMT_DECL): Likewise.
|
||||
(STMT_EXPR_STMT): Likewise.
|
||||
(LABEL_STMT_LABEL): Likewise.
|
||||
|
||||
* c-common.def: Added documenetion for SRCLOC, EXPR_STMT,
|
||||
COMPOUND_STMT, DECL_STMT, IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT,
|
||||
RETURN_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, GOTO_STMT,
|
||||
LABEL_STMT, ASM_STMT, SCOPE_STMT, CASE_LABEL, STMT_EXPR.
|
||||
|
||||
2000-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* configure.in (--enable-checking): Update --help doc to reflect
|
||||
|
|
|
@ -28,25 +28,60 @@ cp-tree.def in the cp subdir. */
|
|||
/* A node to remember a source position. */
|
||||
DEFTREECODE (SRCLOC, "srcloc", 'x', 2)
|
||||
|
||||
/* A whole bunch of tree codes for the initial, superficial parsing of
|
||||
templates. */
|
||||
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", '1', 1)
|
||||
DEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1)
|
||||
DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1)
|
||||
|
||||
/* Used to represent an expression statement. Use `EXPR_STMT_EXPR' to
|
||||
obtain the expression. */
|
||||
DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent a brace-enclosed block. The operand is
|
||||
COMPOUND_BODY. */
|
||||
DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent a local declaration. The operand is
|
||||
DECL_STMT_DECL. */
|
||||
DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1)
|
||||
|
||||
/* Represents an 'if' statement. The operands are IF_COND,
|
||||
THEN_CLAUSE, and ELSE_CLAUSE, respectively. */
|
||||
DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
|
||||
|
||||
/* Used to represent a `for' statement. The operands are
|
||||
FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */
|
||||
DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4)
|
||||
|
||||
/* Used to represent a 'while' statement. The operands are WHILE_COND
|
||||
and WHILE_BODY, respectively. */
|
||||
DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
|
||||
|
||||
/* Used to represent a 'do' statement. The operands are DO_BODY and
|
||||
DO_COND, respectively. */
|
||||
DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
|
||||
|
||||
/* Used to represent a 'return' statement. The operand is
|
||||
RETURN_EXPR. */
|
||||
DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent a 'break' statement. */
|
||||
DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0)
|
||||
|
||||
/* Used to represent a 'continue' statement. */
|
||||
DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
|
||||
|
||||
/* Used to represent a 'switch' statement. The operands are
|
||||
SWITCH_COND and SWITCH_BODY, respectively. */
|
||||
DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
|
||||
|
||||
/* Used to represent a 'goto' statement. The operand is GOTO_DESTINATION. */
|
||||
DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent a 'label' statement. The operand is a LABEL_DECL
|
||||
and can be obtained through the macro LABEL_STMT_LABEL. */
|
||||
DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent an inline assembly statement. */
|
||||
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
|
||||
|
||||
/* A SCOPE_STMT marks the beginning or end of a scope. If
|
||||
|
@ -56,6 +91,11 @@ DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
|
|||
this scope. The SCOPE_STMT_BLOCK is the BLOCK containing the
|
||||
variables declared in this scope. */
|
||||
DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
|
||||
|
||||
/* Used to represent a CASE_LABEL. The operands are CASE_LOW and
|
||||
CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a
|
||||
'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case
|
||||
label. */
|
||||
DEFTREECODE (CASE_LABEL, "case_label", 'e', 2)
|
||||
|
||||
/* A STMT_EXPR represents a statement-expression. The
|
||||
|
|
|
@ -167,32 +167,79 @@ extern tree simple_type_promotes_to PARAMS ((tree));
|
|||
|
||||
/* These macros provide convenient access to the various _STMT nodes
|
||||
created when parsing template declarations. */
|
||||
|
||||
/* IF_STMT accessors. These give access to the condtion of the if
|
||||
statement, the then block of the if statement, and the else block
|
||||
of the if stsatement if it exists. */
|
||||
#define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0)
|
||||
#define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1)
|
||||
#define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2)
|
||||
|
||||
/* WHILE_STMT accessors. These give access to the condtion of the
|
||||
while statement and the body of the while statement, respectively. */
|
||||
#define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
|
||||
#define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
|
||||
|
||||
/* DO_STMT accessors. These give access to the condition of the do
|
||||
statement and the body of the do statement, respectively. */
|
||||
#define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0)
|
||||
#define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1)
|
||||
|
||||
/* RETURN_STMT accessor. This gives the expression associated with a
|
||||
return statement. */
|
||||
#define RETURN_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* EXPR_STMT accessor. This gives the expression associated with an
|
||||
expression statement. */
|
||||
#define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* FOR_STMT accessors. These give access to the init statement,
|
||||
condition, update expression, and body of the for statement,
|
||||
respectively. */
|
||||
#define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
|
||||
#define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
|
||||
#define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
|
||||
#define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
|
||||
|
||||
/* SWITCH_STMT accessors. These give access to the condition and body
|
||||
of the switch statement, respectively. */
|
||||
#define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
|
||||
#define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
|
||||
|
||||
/* CASE_LABEL accessors. These give access to the high and low values
|
||||
of a case label, respectively. */
|
||||
#define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 0)
|
||||
#define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 1)
|
||||
|
||||
/* GOTO_STMT accessor. This gives access to the label associated with
|
||||
a goto statement. */
|
||||
#define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* COMPOUND_STMT accessor. This gives access to the TREE_LIST of
|
||||
statements assocated with a compound statement. The result is the
|
||||
first statement in the list. Succeeding nodes can be acccessed by
|
||||
calling TREE_CHAIN on a node in the list. */
|
||||
#define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* ASM_STMT accessors. ASM_STRING returns a STRING_CST for the
|
||||
instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
|
||||
ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
|
||||
statement. */
|
||||
#define ASM_CV_QUAL(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 0)
|
||||
#define ASM_STRING(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 1)
|
||||
#define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 2)
|
||||
#define ASM_INPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 3)
|
||||
#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4)
|
||||
|
||||
/* DECL_STMT accessor. This gives access to the DECL associated with
|
||||
the given declaration statement. */
|
||||
#define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* STMT_EXPR accessor. */
|
||||
#define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0)
|
||||
|
||||
/* LABEL_STMT accessor. This gives access to the label associated with
|
||||
the given label statement. */
|
||||
#define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0)
|
||||
|
||||
/* Nonzero if this SCOPE_STMT is for the beginning of a scope. */
|
||||
|
|
140
gcc/cp/ChangeLog
140
gcc/cp/ChangeLog
|
@ -1,3 +1,143 @@
|
|||
2000-06-19 Benjamin Chelf <chelf@cabriolet.stanford.edu>
|
||||
|
||||
* cp-tree.h (genrtl_try_block): Declare function.
|
||||
(genrtl_handler): Likewise.
|
||||
(genrtl_catch_block): Likewise.
|
||||
(genrtl_ctor_stmt): Likewise.
|
||||
(genrtl_subobject): Likewise.
|
||||
(genrtl_decl_cleanup): Likewise.
|
||||
(genrtl_do_poplevel): Likewise.
|
||||
(genrtl_do_pushlevel): Likewise.
|
||||
(genrtl_clear_out_block): Likewise.
|
||||
(genrtl_goto_stmt): Likewise.
|
||||
(genrtl_expr_stmt): Likewise.
|
||||
(genrtl_decl_stmt): Likewise.
|
||||
(genrtl_if_stmt): Likewise.
|
||||
(genrtl_while_stmt): Likewise.
|
||||
(genrtl_do_stmt): Likewise.
|
||||
(genrtl_return_stmt): Likewise.
|
||||
(genrtl_for_stmt): Likewise.
|
||||
(genrtl_break_stmt): Likewise.
|
||||
(genrtl_continue_stmt): Likewise.
|
||||
(genrtl_scope_stmt): Likewise.
|
||||
(genrtl_switch_stmt): Likewise.
|
||||
(genrtl_case_label): Likewise.
|
||||
(genrtl_begin_compound_stmt): Likewise.
|
||||
(genrtl_finish_compound_stmt): Likewise.
|
||||
(genrtl_compound_stmt): Likewise.
|
||||
(genrtl_asm_stmt): Likewise.
|
||||
(genrtl_named_return_value): Likewise.
|
||||
(genrtl_begin_stmt_expr): Likewise.
|
||||
(genrtl_finish_stmt_expr): Likewise.
|
||||
(finish_for_stmt): Removed first argument.
|
||||
(finish_switch_stmt): Likewise.
|
||||
|
||||
* semantics.c (genrtl_try_block): Define function.
|
||||
(genrtl_handler): Likewise.
|
||||
(genrtl_catch_block): Likewise.
|
||||
(genrtl_ctor_stmt): Likewise.
|
||||
(genrtl_subobject): Likewise.
|
||||
(genrtl_decl_cleanup): Likewise.
|
||||
(genrtl_do_poplevel): Likewise.
|
||||
(genrtl_do_pushlevel): Likewise.
|
||||
(genrtl_clear_out_block): Likewise.
|
||||
(genrtl_goto_stmt): Likewise.
|
||||
(genrtl_expr_stmt): Likewise.
|
||||
(genrtl_decl_stmt): Likewise.
|
||||
(genrtl_if_stmt): Likewise.
|
||||
(genrtl_while_stmt): Likewise.
|
||||
(genrtl_do_stmt): Likewise.
|
||||
(genrtl_return_stmt): Likewise.
|
||||
(genrtl_for_stmt): Likewise.
|
||||
(genrtl_break_stmt): Likewise.
|
||||
(genrtl_continue_stmt): Likewise.
|
||||
(genrtl_scope_stmt): Likewise.
|
||||
(genrtl_switch_stmt): Likewise.
|
||||
(genrtl_case_label): Likewise.
|
||||
(genrtl_begin_compound_stmt): Likewise.
|
||||
(genrtl_finish_compound_stmt): Likewise.
|
||||
(genrtl_compound_stmt): Likewise.
|
||||
(genrtl_asm_stmt): Likewise.
|
||||
(genrtl_named_return_value): Likewise.
|
||||
(genrtl_begin_stmt_expr): Likewise.
|
||||
(genrtl_finish_stmt_expr): Likewise.
|
||||
(finish_for_stmt): Removed first argument and generate rtl
|
||||
specific code.
|
||||
(finish_switch_stmt): Likewise.
|
||||
(do_poplevel): Removed generate rtl specific code.
|
||||
(do_pushlevel): Likewise.
|
||||
(add_tree): Likewise.
|
||||
(finish_goto_stmt): Likewise.
|
||||
(finish_expr_stmt): Likewise.
|
||||
(begin_if_stmt): Likewise.
|
||||
(finish_if_stmt_cond): Likewise.
|
||||
(finish_then_clause): Likewise.
|
||||
(begin_else_clause): Likewise.
|
||||
(finish_else_clause): Likewise.
|
||||
(finish_if_stmt): Likewise.
|
||||
(clear_out_block): Likewise.
|
||||
(begin_while_stmt): Likewise.
|
||||
(finish_while_stmt_cond): Likewise.
|
||||
(finish_while_stmt): Likewise.
|
||||
(begin_do_stmt): Likewise.
|
||||
(finish_do_body): Likewise.
|
||||
(finish_do_stmt): Likewise.
|
||||
(finish_return_stmt): Likewise.
|
||||
(begin_for_stmt): Likewise.
|
||||
(finish_for_init_stmt): Likewise.
|
||||
(finish_for_cond): Likewise.
|
||||
(finish_for_expr): Likewise.
|
||||
(finish_break_stmt): Likewise.
|
||||
(finish_continue_stmt): Likewise.
|
||||
(begin_switch_stmt): Likewise.
|
||||
(finish_switch_cond): Likewise.
|
||||
(finish_case_label): Likewise.
|
||||
(begin_try_block): Likewise.
|
||||
(begin_function_try_block): Likewise.
|
||||
(finish_try_block): Likewise.
|
||||
(finish_cleanup_try_block): Likewise.
|
||||
(finish_cleanup): Likewise.
|
||||
(finish_function_try_block): Likewise.
|
||||
(finish_handler_sequence): Likewise.
|
||||
(finish_function_handler_sequence): Likewise.
|
||||
(begin_handler): Likewise.
|
||||
(finish_handler_parms): Likewise.
|
||||
(begin_catch_block): Likewise.
|
||||
(finish_handler): Likewise.
|
||||
(begin_compound_stmt): Likewise.
|
||||
(finish_compound_stmt): Likewise.
|
||||
(finish_asm_stmt): Likewise.
|
||||
(finish_label_stmt): Likewise.
|
||||
(finish_label_decl): Likewise.
|
||||
(finish_subobject): Likewise.
|
||||
(finish_decl_cleanup): Likewise.
|
||||
(finish_named_return_value): Likewise.
|
||||
(begin_stmt_expr): Likewise.
|
||||
(finish_stmt_expr): Likewise.
|
||||
|
||||
* decl.c (initialize_local_var): Changed call to finish_expr_stmt
|
||||
to call genrtl_expr_stmt when appropriate.
|
||||
|
||||
* init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
|
||||
begin_compound_expr to call genrtl_begin_stmt_expr and
|
||||
genrtl_begin_compound_expr when appropriate.
|
||||
(finish_init_stmts): Changed calls to finish_compound_expr and
|
||||
finish_stmt_expr to call genrtl_finish_compound_expr and
|
||||
genrtl_finish_stmt_expr when appropriate.
|
||||
(expand_default_init): Changed call to finish_expr_stmt to call
|
||||
genrtl_expr_stmt when appropriate.
|
||||
(build_vec_init): Likewise.
|
||||
|
||||
* parse.y (simple_stmt): Removed first argument from call to
|
||||
finish_for_stmt. Removed first argument from call to
|
||||
finish_switch_stmt.
|
||||
|
||||
* parse.c: Regenerated.
|
||||
|
||||
* pt.c (tsubst_expr): Removed first argument from call to
|
||||
finish_for_stmt. Removed first argument from call to
|
||||
finish_switch_stmt.
|
||||
|
||||
2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
|
||||
|
||||
* cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
|
||||
|
|
|
@ -4406,12 +4406,12 @@ extern tree begin_for_stmt PARAMS ((void));
|
|||
extern void finish_for_init_stmt PARAMS ((tree));
|
||||
extern void finish_for_cond PARAMS ((tree, tree));
|
||||
extern void finish_for_expr PARAMS ((tree, tree));
|
||||
extern void finish_for_stmt PARAMS ((tree, tree));
|
||||
extern void finish_for_stmt PARAMS ((tree));
|
||||
extern void finish_break_stmt PARAMS ((void));
|
||||
extern void finish_continue_stmt PARAMS ((void));
|
||||
extern tree begin_switch_stmt PARAMS ((void));
|
||||
extern void finish_switch_cond PARAMS ((tree, tree));
|
||||
extern void finish_switch_stmt PARAMS ((tree, tree));
|
||||
extern void finish_switch_stmt PARAMS ((tree));
|
||||
extern void finish_case_label PARAMS ((tree, tree));
|
||||
extern void finish_goto_stmt PARAMS ((tree));
|
||||
extern tree begin_try_block PARAMS ((void));
|
||||
|
@ -4480,6 +4480,40 @@ extern void do_pushlevel PARAMS ((void));
|
|||
extern tree do_poplevel PARAMS ((void));
|
||||
extern void finish_mem_initializers PARAMS ((tree));
|
||||
|
||||
extern void genrtl_try_block PARAMS ((tree));
|
||||
extern void genrtl_handler PARAMS ((tree));
|
||||
extern void genrtl_catch_block PARAMS ((tree));
|
||||
extern void genrtl_ctor_stmt PARAMS ((tree));
|
||||
extern void genrtl_subobject PARAMS ((tree));
|
||||
extern void genrtl_decl_cleanup PARAMS ((tree, tree));
|
||||
extern tree genrtl_do_poplevel PARAMS ((void));
|
||||
extern void genrtl_do_pushlevel PARAMS ((void));
|
||||
extern void genrtl_clear_out_block PARAMS ((void));
|
||||
extern void genrtl_goto_stmt PARAMS ((tree));
|
||||
extern void genrtl_expr_stmt PARAMS ((tree));
|
||||
extern void genrtl_decl_stmt PARAMS ((tree));
|
||||
extern void genrtl_if_stmt PARAMS ((tree));
|
||||
extern void genrtl_while_stmt PARAMS ((tree));
|
||||
extern void genrtl_do_stmt PARAMS ((tree));
|
||||
extern void genrtl_return_stmt PARAMS ((tree));
|
||||
extern void genrtl_for_stmt PARAMS ((tree));
|
||||
extern void genrtl_break_stmt PARAMS ((void));
|
||||
extern void genrtl_continue_stmt PARAMS ((void));
|
||||
extern void genrtl_scope_stmt PARAMS ((tree));
|
||||
extern void genrtl_switch_stmt PARAMS ((tree));
|
||||
extern void genrtl_case_label PARAMS ((tree, tree));
|
||||
extern tree genrtl_begin_compound_stmt PARAMS ((int));
|
||||
extern tree genrtl_finish_compound_stmt PARAMS ((int));
|
||||
extern tree genrtl_compound_stmt PARAMS ((tree));
|
||||
extern void genrtl_asm_stmt PARAMS ((tree, tree,
|
||||
tree, tree,
|
||||
tree));
|
||||
extern void genrtl_named_return_value PARAMS ((tree,
|
||||
tree));
|
||||
extern tree genrtl_begin_stmt_expr PARAMS ((void));
|
||||
extern tree genrtl_finish_stmt_expr PARAMS ((tree));
|
||||
|
||||
|
||||
/* in spew.c */
|
||||
extern void init_spew PARAMS ((void));
|
||||
extern int peekyylex PARAMS ((void));
|
||||
|
|
|
@ -7980,7 +7980,10 @@ initialize_local_var (decl, init, flags)
|
|||
DECL_SOURCE_LINE (decl));
|
||||
saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p;
|
||||
stmts_are_full_exprs_p = 1;
|
||||
finish_expr_stmt (build_aggr_init (decl, init, flags));
|
||||
if (building_stmt_tree ())
|
||||
finish_expr_stmt (build_aggr_init (decl, init, flags));
|
||||
else
|
||||
genrtl_expr_stmt (build_aggr_init (decl, init, flags));
|
||||
stmts_are_full_exprs_p = saved_stmts_are_full_exprs_p;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,8 +97,15 @@ begin_init_stmts (stmt_expr_p, compound_stmt_p)
|
|||
tree *stmt_expr_p;
|
||||
tree *compound_stmt_p;
|
||||
{
|
||||
*stmt_expr_p = begin_stmt_expr ();
|
||||
*compound_stmt_p = begin_compound_stmt (/*has_no_scope=*/1);
|
||||
if (building_stmt_tree ())
|
||||
*stmt_expr_p = begin_stmt_expr ();
|
||||
else
|
||||
*stmt_expr_p = genrtl_begin_stmt_expr ();
|
||||
|
||||
if (building_stmt_tree ())
|
||||
*compound_stmt_p = begin_compound_stmt (/*has_no_scope=*/1);
|
||||
else
|
||||
*compound_stmt_p = genrtl_begin_compound_stmt (/*has_no_scope=*/1);
|
||||
}
|
||||
|
||||
/* Finish out the statement-expression begun by the previous call to
|
||||
|
@ -108,10 +115,18 @@ tree
|
|||
finish_init_stmts (stmt_expr, compound_stmt)
|
||||
tree stmt_expr;
|
||||
tree compound_stmt;
|
||||
{
|
||||
finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
|
||||
stmt_expr = finish_stmt_expr (stmt_expr);
|
||||
|
||||
{
|
||||
if (building_stmt_tree ())
|
||||
finish_compound_stmt (/*has_no_scope=*/1, compound_stmt);
|
||||
else
|
||||
genrtl_finish_compound_stmt (/*has_no_scope=*/1);
|
||||
|
||||
if (building_stmt_tree ())
|
||||
stmt_expr = finish_stmt_expr (stmt_expr);
|
||||
else
|
||||
stmt_expr = genrtl_finish_stmt_expr (stmt_expr);
|
||||
|
||||
/* To avoid spurious warnings about unused values, we set
|
||||
TREE_USED. */
|
||||
if (stmt_expr)
|
||||
|
@ -1297,7 +1312,12 @@ expand_default_init (binfo, true_exp, exp, init, flags)
|
|||
|
||||
rval = build_method_call (exp, ctor_name, parms, binfo, flags);
|
||||
if (TREE_SIDE_EFFECTS (rval))
|
||||
finish_expr_stmt (rval);
|
||||
{
|
||||
if (building_stmt_tree ())
|
||||
finish_expr_stmt (rval);
|
||||
else
|
||||
genrtl_expr_stmt (rval);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function is responsible for initializing EXP with INIT
|
||||
|
@ -2988,7 +3008,7 @@ build_vec_init (decl, base, maxindex, init, from_array)
|
|||
full-expression. */
|
||||
if (!building_stmt_tree ())
|
||||
{
|
||||
finish_expr_stmt (elt_init);
|
||||
genrtl_expr_stmt (elt_init);
|
||||
expand_end_target_temps ();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -7698,7 +7698,7 @@ case 734:
|
|||
break;}
|
||||
case 735:
|
||||
#line 3297 "parse.y"
|
||||
{ finish_for_stmt (yyvsp[-3].ttype, yyvsp[-10].ttype); ;
|
||||
{ finish_for_stmt (yyvsp[-10].ttype); ;
|
||||
break;}
|
||||
case 736:
|
||||
#line 3299 "parse.y"
|
||||
|
@ -7710,7 +7710,7 @@ case 737:
|
|||
break;}
|
||||
case 738:
|
||||
#line 3303 "parse.y"
|
||||
{ finish_switch_stmt (yyvsp[-3].ttype, yyvsp[-5].ttype); ;
|
||||
{ finish_switch_stmt (yyvsp[-5].ttype); ;
|
||||
break;}
|
||||
case 739:
|
||||
#line 3305 "parse.y"
|
||||
|
|
|
@ -3294,13 +3294,13 @@ simple_stmt:
|
|||
xexpr ')'
|
||||
{ finish_for_expr ($9, $<ttype>2); }
|
||||
already_scoped_stmt
|
||||
{ finish_for_stmt ($9, $<ttype>2); }
|
||||
{ finish_for_stmt ($<ttype>2); }
|
||||
| SWITCH
|
||||
{ $<ttype>$ = begin_switch_stmt (); }
|
||||
'(' condition ')'
|
||||
{ finish_switch_cond ($4, $<ttype>2); }
|
||||
implicitly_scoped_stmt
|
||||
{ finish_switch_stmt ($4, $<ttype>2); }
|
||||
{ finish_switch_stmt ($<ttype>2); }
|
||||
| CASE expr_no_commas ':'
|
||||
{ finish_case_label ($2, NULL_TREE); }
|
||||
stmt
|
||||
|
|
|
@ -7215,7 +7215,7 @@ tsubst_expr (t, args, complain, in_decl)
|
|||
tmp = tsubst_expr (FOR_EXPR (t), args, complain, in_decl);
|
||||
finish_for_expr (tmp, stmt);
|
||||
tsubst_expr (FOR_BODY (t), args, complain, in_decl);
|
||||
finish_for_stmt (tmp, stmt);
|
||||
finish_for_stmt (stmt);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -7303,7 +7303,7 @@ tsubst_expr (t, args, complain, in_decl)
|
|||
val = tsubst_expr (SWITCH_COND (t), args, complain, in_decl);
|
||||
finish_switch_cond (val, stmt);
|
||||
tsubst_expr (SWITCH_BODY (t), args, complain, in_decl);
|
||||
finish_switch_stmt (val, stmt);
|
||||
finish_switch_stmt (stmt);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
1594
gcc/cp/semantics.c
1594
gcc/cp/semantics.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue