diff options
author | Ben Chelf <chelf@gcc.gnu.org> | 2000-07-01 22:23:01 -0700 |
---|---|---|
committer | Ben Chelf <chelf@gcc.gnu.org> | 2000-07-01 22:23:01 -0700 |
commit | f2c5f623b0eec0fbac3eda4d020cccbca01d7afc (patch) | |
tree | 322133cfcfd4ce1672bbd64e4e165811a77d8828 /gcc/c-decl.c | |
parent | d6f46e4177b1d39d36f5906e67939941c009d995 (diff) | |
download | gcc-f2c5f623b0eec0fbac3eda4d020cccbca01d7afc.zip gcc-f2c5f623b0eec0fbac3eda4d020cccbca01d7afc.tar.gz gcc-f2c5f623b0eec0fbac3eda4d020cccbca01d7afc.tar.bz2 |
Makefile.in (C_AND_OBJC_OBJS): Added c-semantics.o.
2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
* Makefile.in (C_AND_OBJC_OBJS): Added c-semantics.o.
(c-semantics.o): New target.
* c-common.h (TREE_LANG_FLAG_?): Added documentation.
(genrtl_do_pushlevel): Moved from cp/cp-tree.h.
(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.
(gerntl_finish_compound_stmt): Likewise.
(genrtl_compound_stmt): Likewise.
(genrtl_asm_stmt): Likewise.
(genrtl_decl_cleanup): Likewise.
(DECL_ANON_UNION_ELEMS): Likewise.
(emit_local_var): Likewise.
(make_rtl_for_local_static): Likewise.
(expand_cond): Likewise.
(expand_stmt): Likewise.
(c_expand_return): Likewise.
(c_expand_start_case): Likewise.
(do_case): Likewise.
(COMPOUND_STMT_NO_SCOPE): Likewise.
(c_expand_asm_operands): Likewise.
(NEW_FOR_SCOPE_P): New macro.
(expand_expr_stmt_fn): New type.
(set_current_function_name_declared): Likewise.
(current_function_name_declared): Likewise.
(lang_expand_stmt): Likewise.
(stmts_are_full_exprs_p): Likewise.
(anon_aggr_type_p): Likewise.
(lang_expand_expr_stmt): Likewise.
(build_case_label): Likewise.
* c-decl.c (lang_expand_expr_stmt): Initialize.
(stmts_are_full_exprs_p): Define.
(current_function_name_declared): Likewise.
(do_case): Likewise.
(lang_expand_stmt): Likewise.
(set_current_function_name_declared): Likewise.
(anon_aggr_type_p): Likewise.
(build_case_label): Likewise.
* c-semantics.c: New file.
(expand_cond): Moved from cp/semantics.c.
(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_decl_cleanup): Likewise.
(make_rtl_for_local_static): Moved from cp/decl.c.
(emit_local_var): Likewise.
(expand_stmt): Define.
* c-tree.h: (c_expand_asm_operands): Moved to c-common.h.
(c_expand_return): Likewise.
(c_expand_start_case): Likewise.
* cp/Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
* cp/Makefile.in (OBJS): Added ../c-semantics.o.
(OBJDEPS): Likewise.
* cp/cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
../c-common.h.
(struct stmt_tree): Added comment.
(current_function_name_declared): Removed.
(stmts_are_full_exprs_p): Likewise.
(genrtl_do_pushlevel): Likewise.
(genrtl_clear_out_block): Likewise.
(COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
(DECL_ANON_UNION_ELEMS): Likewise.
(emit_local_var): Likewise.
(make_rtl_for_local_static): Likewise.
(do_case): Likewise.
(expand_stmt): Likewise.
(genrtl_decl_cleanup): Likewise.
(c_expand_asm_operands): Likewise.
(c_expand_return): Likewise.
(c_expand_start_case): Likewise.
* cp/decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
(emit_local_var): Likewise.
(initialize_local_var): Change reference to
stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
Change reference to stmts_are_full_exprs_p to
current_stmt_tree->stmts_are_full_exprs_p.
(push_cp_function_context): Likewise.
* cp/expect.c (expand_throw): Change reference to
stmts_are_full_exprs_p.
* cp/init.c (build_aggr_init): Change reference to
stmts_are_full_exprs_p.
(build_vec_init): Likewise.
* cp/optimize.c (maybe_clone_body): Change reference to
current_function_name_declared to
cp_function_chain->name_declared.
* cp/pt.c (instantiate_decl): Change reference to
current_function_name_declared to
cp_function_chain->name_declared.
* cp/semantics.c (expand_cond): Moved declaration to c-common.h.
(genrtl_do_pushlevel): Moved to c-semantics.c.
(genrtl_clear_out_block): Likewise.
(genrtl_goto_stmt): Likewise.
(genrtl_expr_stmt): Likewise.
(genrtl_decl_stmt): Likewise.
(gerntl_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_decl_cleanup): Likewise.
(expand_cond): Likewise.
(expand_stmt): Renamed to ...
(lang_expand_stmt): ... this.
(lang_expand_expr_stmt): Initialize.
(set_current_function_name_declared): Likewise.
(stmts_are_full_exprs_p): Likewise.
(current_function_name_declared): Likewise.
(anon_aggr_type_p): Likewise.
(do_poplevel): Change reference to
stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
Change reference to stmts_are_full_exprs_p to
current_stmt_tree->stmts_are_full_exprs_p.
(add_tree): Likewise.
(finish_expr_stmt): Likewise.
(prep_stmt): Likewise.
(lang_expand_stmt): Likewise.
(begin_compound_stmt): Change reference to
current_function_name_declared to
cp_function_chain->name_declared and call to
current_function_name_declared().
(setup_vtbl_ptr): Likewise.
(genrtl_do_poplevel): Removed.
From-SVN: r34827
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 21f71f8..8319f45 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -455,6 +455,10 @@ int warn_float_equal = 0; int warn_multichar = 1; +/* Wrapper since C and C++ expand_expr_stmt are different. */ + +expand_expr_stmt_fn lang_expand_expr_stmt = c_expand_expr_stmt; + /* The variant of the C language being processed. */ c_language_kind c_language = clk_c; @@ -6793,3 +6797,69 @@ lang_mark_tree (t) else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t)) ggc_mark (TYPE_LANG_SPECIFIC (t)); } + +/* The functions below are required for functionality of doing + function at once processing in the C front end. Currently these + functions are not called from anywhere in the C front end, but as + these changes continue, that will change. */ + +/* Returns non-zero if the current statement is a full expression, + i.e. temporaries created during that statement should be destroyed + at the end of the statement. */ + +int +stmts_are_full_exprs_p () +{ + return 0; +} + +/* Nonzero if TYPE is an anonymous union or struct type. Always 0 in + C. */ + +int +anon_aggr_type_p (node) + tree node; +{ + return 0; +} + +/* One if we have already declared __FUNCTION__ (and related + variables) in the current function. Two if we are in the process + of doing so. */ + +int +current_function_name_declared () +{ + abort (); + return 0; +} + +/* Code to generate the RTL for a case label in C. */ + +void +do_case (low_value, high_value) + tree low_value; + tree high_value; +{ + abort (); +} + +/* Language specific handler of tree nodes used when generating RTL + from a tree. */ + +tree +lang_expand_stmt (t) + tree t; +{ + abort (); + return NULL_TREE; +} + +/* Accessor to set the 'current_function_name_declared' flag. */ + +void +set_current_function_name_declared (i) + int i; +{ + abort (); +} |