Commit Graph

33 Commits

Author SHA1 Message Date
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Ian Lance Taylor 934790cc67 c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
./	* c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
	* c-common.h (EXPR_STMT_EXPR): Don't define.
	(c_common_stmt_codes): Don't define.
	* c-dump.c (c_dump_tree): Remove EXPR_STMT case.
	* c-gimplify.c (gimplify_expr_stmt): Remove.
	(c_gimplify_expr): Remove EXPR_STMT case.
	* c-objc-common.c (c_objc_common_init): Remove stmt_codes and call
	to INIT_STATEMENT_CODES.
	* c-pretty-print.c (pp_c_statement): Just call dump_generic_node.
cp/
	* cp-tree.def: Add EXPR_STMT.
	* cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
	(EXPR_STMT_EXPR): Define.
	* cp-gimplify.c: Include "flags.h".
	(gimplify_expr_stmt): New static function.
	(cp_gimplify_expr): Handle EXPR_STMT.
	* cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
	rather than pp_expression.
	(pp_cxx_statement): Handle EXPR_STMT.
	* dump.c (cp_dump_tree): Handle EXPR_STMT.
	* lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
	initializer.

From-SVN: r98731
2005-04-25 19:03:41 +00:00
Ian Lance Taylor c3e5898be3 c-common.def: Remove STMT_EXPR (moved to cp/cp-tree.def).
./	* c-common.def: Remove STMT_EXPR (moved to cp/cp-tree.def).
	* c-common.h (STMT_EXPR_STMT): Don't define.
	(STMT_EXPR_NO_SCOPE): Don't define.
	* c-dump.c (c_dump_tree): Don't handle STMT_EXPR.
	* c-pretty-print.c (pp_c_primary_expression): Likewise.
	(pp_c_expression): Likewise.
cp/
	* cp-tree.def: Add STMT_EXPR.
	* cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
	(STMT_EXPR_STMT): Define.
	* cxx-pretty-print.c (pp_cxx_primary_expression): Handle
	STMT_EXPR.
	(pp_cxx_expression): Likewise.
	(pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
	* dump.c (cp_dump_tree): Handle STMT_EXPR.

From-SVN: r98469
2005-04-20 19:59:16 +00:00
Ian Lance Taylor fbc315db4a c-common.def: Move FOR_STMT...
./	* c-common.def: Move FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
	CONTINUE_STMT, and SWITCH_STMT to cp/cp-tree.def.
	* c-common.h (WHILE_COND, WHILE_BODY): Move to cp/cp-tree.h.
	(DO_COND, DO_BODY): Likewise.
	(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Likewise.
	(SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Likewise.
	(c_common_stmt_codes): Remove FOR_STMT, WHILE_STMT, DO_STMT,
	BREAK_STMT, CONTINUE_STMT, and SWITCH_STMT.
	(build_continue_stmt, build_break_stmt): Don't declare.
	(c_do_switch_warnings): Update declaration.
	* c-gimplify.c (enum bc_t): Remove.
	(struct c_gimplify_ctx, ctxp): Remove.
	(push_context, pop_context): Remove static functions.
	(c_genericize): Don't call push_context or pop_context.
	(begin_bc_block, finish_bc_block): Remove static functions.
	(build_bc_goto): Likewise.
	(gimplify_c_loop): Likewise.
	(gimplify_for_stmt, gimplify_while_stmt): Likewise.
	(gimplify_do_stmt, gimplify_switch_stmt): Likewise.
	(c_gimplify_expr): Remove handling of FOR_STMT, WHILE_STMT,
	DO_STMT, SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
	* c-common.c (c_do_switch_warnings): Rename from
	c_do_switch_warnings_1.
	(c_do_switch_warnings) [old version]: Remove.
	(c_do_switch_expr_warnings): Remove.
	* c-typeck.c (c_finish_case): Call new c_do_switch_warnings
	function instead of c_do_switch_expr_warnings.
	* c-dump.c (c_dump_tree): Remove handling of BREAK_STMT,
	CONTINUE_STMT, DO_STMT, FOR_STMT, SWITCH_STMT, and WHILE_STMT.
	* c-pretty-print.c (pp_c_statement): Likewise.
	* c-semantics.c (build_break_stmt, build_continue_stmt): Remove.
cp/
	* cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
	CONTINUE_STMT, SWITCH_STMT.
	* cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
	BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
	(WHILE_COND, WHILE_BODY): Define.
	(DO_COND, DO_BODY): Define.
	(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
	(SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
	* cp-gimplify.c (enum bc_t): Define.
	(struct cp_gimplify_ctx, ctxp): Define.
	(push_context, pop_context): New static functions.
	(begin_bc_block, finish_bc_block): New static functions.
	(build_bc_goto): New static function.
	(gimplify_cp_loop, gimplify_for_stmt): New static functions.
	(gimplify_while_stmt, gimplify_do_stmt): Likewise.
	(gimplify_switch_stmt): Likewise.
	(cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
	SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
	(cp_genericize): Call push_context and pop_context.
	* semantics.c (finish_break_stmt): Just call build_stmt
	(BREAK_STMT) rather than build_break_stmt.
	(finish_continue_stmt): Corresponding change.
	* decl.c (pop_switch): Update call to c_do_switch_warnings for new
	parameters.
	* cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
	WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
	* dump.c (cp_dump_tree): Likewise.

From-SVN: r97885
2005-04-09 03:18:18 +00:00
Kazu Hirata f93089d26f c-common.def, [...]: Update copyright.
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
	cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h,
	tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c,
	config/avr/avr.md, config/cris/aout.h, config/cris/cris.h,
	config/mips/iris6.h, config/sh/sh.c: Update copyright.

From-SVN: r94328
2005-01-27 18:22:35 +00:00
Steven Bosscher ebaae5827a tree.h (SWITCH_COND, [...]): Add tree checks.
* tree.h (SWITCH_COND, SWITCH_BODY, SWITCH_LABELS, CASE_LOW,
	CASE_HIGH, CASE_LABEL, ASM_STRING, ASM_OUTPUTS, ASM_INPUTS,
	ASM_CLOBBERS): Add tree checks.

	* c-common.h (SWITCH_TYPE): Rename to SWITCH_STMT_TYPE.
	(SWITCH_STMT_COND, SWITCH_STMT_BODY): New.
	* c-common.def (SWITCH_STMT): Update to match.
	* c-common.c (c_do_switch_warnings): Use SWITCH_STMT accessor
	macros instead of SWITCH_EXPR ones.
	* c-dump.c (c_dump_tree): Likewise.
	* c-gimplify.c (gimplify_switch_stmt): Likewise.
	* c-typeck.c (c_start_case, do_case, c_finish_case): Likewise.

cp/
	* decl.c (finish_case_label): Use SWITCH_STMT accessor macros
	instead of SWITCH_EXPR ones.
	* pt.c (tsubst_expr): Likewise.
	* semantics.c (begin_switch_stmt, finish_switch_cond,
	finish_switch_stmt): Likewise.

doc/
	* c-tree.texi (SWITCH_STMT): Update accessor macro names.

From-SVN: r94315
2005-01-27 07:32:26 +00:00
Per Bothner 3c20847b83 Conditionally compile support for --enable-mapped_location.
* basic-block.h (struct edge_def):  Use new source_locus typedef.
	* c-common.c (fname_decl):  Update save/clear/store of input_location.
	(c_do_switch_warnings):  Update for USE_MAPPED_LOCATION case.
	* c-decl.c:  Likewise.
	* c-dump.c (dump_stmt):  Likewise.
	* c-gimplify.c (c-gimplify.c):  Generalize using SET_EXPR_LOCATION.
	* c-lex.c (cb_line_change):  If USE_MAPPED_LOCATION use token's	src_loc
	to set input_location direction, rather than using linemap_lookup.
	(fe_file_change, cb_def_pragma):  Again use source_location directly.
	* c-opts.c (saved_lineno):  Remove static variable.
	(c_common_post_options, c_common_init):  Don't bothner to save,
	clear and restore input_Location - now handled by lang_dependent_init.
	* function.c (init_function_start):  Use new DECL_IS_BUILTIN macro.
	* xcoffout.c (xcoff_assign_fundamental_type_number):  Likewise.

From-SVN: r83919
2004-06-30 11:05:07 -07:00
Richard Kenner 350fae6628 c-common.c (c_safe_from_p, [...]): Deleted.
2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * c-common.c (c_safe_from_p, c_walk_subtrees): Deleted.
        * c-common.def (DECL_STMT): Remove.
        * c-common.h (DECL_STMT_DECL): Deleted.
        (COMPOUNT_LITERAL_EXPR_DECL): Use DECL_EXPR_DECL.
        (c_safe_from_p, c_walk_subtrees): Deleted.
        * c-decl.c, c-parse.in, c-pretty-print.c: DECL_STMT now DECL_EXPR.
        * c-dump.c (c_dump_tree, case DECL_STMT): Deleted.
        * c-gimplify.c (gimplify_decl_stmt): Deleted.
        (gimplify_compound_literal_expr): Use DECL_EXPR_DECL
        and gimplify_and_add.
        (c_gimplify_expr, case DECL_EXPR): New case.
        (c_gimplify_expr, case DECL_STMT): Deleted.
        * c-lang.c (LANG_HOOKS_SAFE_FROM_P): Likewise.
        (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise.
        * expr.c (safe_from_p, case 's'): New case.
        * gimplify.c (gimplify_decl_expr): New function.
        (gimplify_expr, case DECL_EXPR): New case.
        * tree-inline.c (walk_tree): Walk into all fields of a type and
        decl only if they are in a DECL_EXPR.
        (mark_local_for_remap_r): Minor code cleanup.
        * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Add else.
        * tree.c (has_cleanups, case DECL_EXPR): New case.
        * tree.def (DECL_EXPR): New code.
        * tree.h (DECL_EXPR_DECL): New macro.

        * objc/objc-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.

From-SVN: r83721
2004-06-26 17:11:23 -04:00
Richard Henderson 5088b05874 c-common.def (RETURN_STMT): Remove.
* c-common.def (RETURN_STMT): Remove.
        * c-common.h (RETURN_STMT_EXPR): Remove.
        (c_expand_return, build_return_stmt): Remove.
        (c_common_stmt_codes): Remove RETURN_STMT.
        * c-dump.c (dump_next_stmt): Remove.
        (c_dump_tree): Remove RETURN_STMT.
        * c-decl.c (finish_function): Use c_finish_return.
        * c-parse.in (stmt): Likewise.
        * c-gimplify.c (gimplify_return_stmt): Remove.
        (c_gimplify_expr): Remove RETURN_STMT.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * c-semantics.c (build_return_stmt): Remove.
        * c-tree.h (c_finish_return): Declare.
        * c-typeck.c (c_finish_return): Rename from c_expand_return.
        Return void.  Build RETURN_EXPR directly.
        * tree-dump.h (dump_next_stmt): Remove.
cp/
        * dump.c (cp_dump_tree): Don't use dump_next_stmt.
        * parser.c (cp_parser_jump_statement): Update commentary.
        * pt.c (tsubst_expr): Use RETURN_EXPR.
        * semantics.c (finish_return_stmt): Likewise.
        (finalize_nrv_r): Likewise.
        * typeck.c, typeck2.c: Update file start commentary.

From-SVN: r83461
2004-06-21 16:30:30 -07:00
Richard Henderson 5a5086621e c-common.def (IF_STMT, [...]): Move to cp-tree.def.
* c-common.def (IF_STMT, CLEANUP_STMT): Move to cp-tree.def.
        * c-common.h (IF_COND, THEN_CLAUSE, ELSE_CLAUSE, CLEANUP_BODY,
        CLEANUP_EXPR, CLEANUP_DECL): Move to cp-tree.h.
        (c_common_stmt_codes): Remove IF_STMT, CLEANUP_STMT.
        * c-dump.c (c_dump_tree): Move IF_STMT, CLEANUP_STMT to cp_dump_tree.
        * c-pretty-print.c (pp_c_statement): Similarly.
        * c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts,
        gimplify_if_stmt): Move to cp-gimplify.c.
        (c_genericize, c_gimplify_expr): Don't call them.
        * c-semantics.c (push_cleanup): Move to cp/semantics.c.
        * c-typeck.c (push_cleanup): New.
        (c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_finish_else,
        c_finish_if_stmt): Use COND_EXPR.
        * tree.h (CLEANUP_EH_ONLY): Update documentation.
cp/
        * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
        * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
        (cp_gimplify_expr): Call it.
        (gimplify_cleanup_stmt): Move from c-gimplify.c.
        (cp_genericize): New.
        * decl.c (finish_function): Call it.
        * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
        (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
        (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
        (cp_genericize): Declare.
        * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
        * dump.c (cp_dump_tree): Likewise.
        * semantics.c (push_cleanup): Move from c-semantics.c.

From-SVN: r83407
2004-06-20 02:18:13 -07:00
Richard Henderson 5882f0f31a c-common.def (COMPOUND_STMT): Remove.
* c-common.def (COMPOUND_STMT): Remove.
        * c-common.c (finish_fname_decls): Don't look through it.
        * c-typeck.c (c_tree_expr_nonnegative_p): Likewise.
        * c-common.h (COMPOUND_BODY): Remove.
        (c_common_stmt_codes): Remove COMPOUND_STMT.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * tree.h (DECL_SAVED_TREE): Update commentary.
        * doc/c-tree.texi (ASM_EXPR): Rename from ASM_STMT.
        (CASE_LABEL_EXPR): Rename from CASE_LABEL.
        (GOTO_EXPR): Rename from GOTO_STMT.
        (GOTO_FAKE_P): Remove.
        (COMPOUND_STMT): Remove.
        (HANDLER): Update wrt COMPOUND_STMT.
        (STMT_EXPR): Likewise.
        (LABEL_EXPR): Rename from LABEL_STMT.
        (SCOPE_STMT): Remove.
        * objc/objc-act.c (objc_build_try_catch_finally_stmt): Don't look
        through COMPOUND_STMT.
cp/
        * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
        (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
        * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
        of CTOR_INITIALIZER ...
        (pp_cxx_statement): ... here.
        * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
        (finish_function): Use alloc_stmt_list to zap entire function.
        * parser.c (cp_parser_compound_statement): Update commentary.
        * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
        * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
        (finish_stmt_expr): Don't look through COMPOUND_STMT.

From-SVN: r83281
2004-06-16 18:24:06 -07:00
Richard Henderson 8c16199578 c-common.def (CASE_LABEL): Remove.
* c-common.def (CASE_LABEL): Remove.
        * c-common.c (c_add_case_label): Use CASE_LABEL, not CASE_LABEL_DECL.
        (match_case_to_enum_1): Likewise.
        * c-common.h (c_common_stmt_codes): Remove CASE_LABEL.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * c-semantics.c (build_case_label): Use CASE_LABEL_EXPR.
        * tree.h (CASE_LOW): Update commentary.
cp/
        * parser.c (cp_parser_labeled_statement): Update commentary.
        * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
        * tree.c (mark_local_for_remap_r): Likewise.

From-SVN: r83261
2004-06-16 13:51:46 -07:00
Richard Henderson e130a54b78 c-common.def (ASM_STMT): Remove.
* c-common.def (ASM_STMT): Remove.
        * c-common.h (c_common_stmt_codes): Remove ASM_STMT.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * c-typeck.c (build_asm_expr): Use ASM_EXPR.
        * tree.h: Fix commentary.
cp/
        * parser.c (cp_parser_asm_definition): Update commentary.
        * pt.c (tsubst_expr): Use ASM_EXPR.
        * semantics.c (finish_asm_stmt): Likewise.

From-SVN: r83260
2004-06-16 13:23:02 -07:00
Richard Henderson 9e14e18fd1 c-common.def (GOTO_STMT, LABEL_STMT): Remove.
* c-common.def (GOTO_STMT, LABEL_STMT): Remove.
        * c-common.c (c_add_case_label): Use LABEL_EXPR.
        * c-common.h (GOTO_FAKE_P, LABEL_STMT_LABEL): Remove.
        (c_common_stmt_codes): Remove GOTO_STMT, LABEL_STMT.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * c-parse.in (stmt): Use GOTO_EXPR.
        (label): Use LABEL_EXPR.
        * c-semantics.c (build_stmt): Set TREE_TYPE to void.
        * tree-inline.c (copy_body_r): Don't build empty BLOCKs.
cp/
        * decl.c (finish_destructor_body): Use LABEL_EXPR.
        * parser.c (cp_parser_statement): Update commentary.
        * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
        * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
        * tree.c (mark_local_for_remap_r): Likewise.

From-SVN: r83255
2004-06-16 11:21:20 -07:00
Richard Henderson 325c369115 c-common.c (lang_gimplify_stmt): Remove next_p argument.
* c-common.c (lang_gimplify_stmt): Remove next_p argument.
	(if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then,
	c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt,
	c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c.
	(finish_fname_decls, fname_decl): Use statement_lists.
	(c_expand_expr_stmt): Don't set last_expr_type.
	(c_type_hash): Fix indentation.
	(c_safe_from_p): Don't follow TREE_CHAIN.
	(c_tree_chain_matters_p): Remove.
	* c-common.def (SCOPE_STMT): Remove.
	(CLEANUP_STMT): Redefine to contain its own body.
	* c-common.h (struct stmt_tree_s): Remove x_last_stmt,
	x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack.
	Add x_cur_stmt_list.
	(last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove.
	(cur_stmt_list): New.
	(STATEMENT_LIST_STMT_EXPR): New.
	(SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P,
	SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove.
	(CLEANUP_BODY): New.
	(CLEANUP_DECL): Move to operand 2.
	(c_common_stmt_codes): Remove SCOPE_STMT.
	(COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove.
	* c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove.
	(c_push_function_context, c_pop_function_context): Don't save it.
	(finish_decl): Set TREE_USED on the decl for a cleanup.
	Use push_cleanup.
	(store_parm_decls): Use statement lists.
	(finish_function): Remove compstmt rule workaround.  Use statement
	lists.  Call finish_fname_decls after finalizing the body.
	(c_begin_compound_stmt): Move to c-typeck.c.
	* c-dump.c (c_dump_tree): Remove SCOPE_STMT.
	* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New.
	(c_genericize): Invoke them.
	(c_gimplify_stmt): Don't look through TREE_CHAIN.  Kill SCOPE_STMT.
	(c_build_bind_expr): Export.
	(gimplify_block, gimplify_cleanup): Remove.
	(gimplify_condition): Use gimplify_stmt.
	(gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack.
	(gimplify_if_stmt): Remove recursion hack.
	(c_gimplify_expr): Remove STMT_EXPR handling.
	(stmt_expr_last_stmt, gimplify_stmt_expr): Remove.
	(is_last_stmt_of_scope): Remove.
	* c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
	* c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt,
	c_end_compound_stmt.
	* c-objc-common.c (build_cdtor): Likewise.
	* c-parse.in (primary): Use c_finish_stmt_expr.
	(push_scope, pop_scope): Remove.
	(c99_block_start, compstmt_start): Use c_begin_compound_stmt.
	(c99_block_end, compstmt): Use c_end_compound_stmt.
	(c99_block_lineno_labeled_stmt): Likewise.
	(compstmt_primary_start): Use c_begin_stmt_expr.
	(simple_if, select_or_iter_stmt): Update calls to stmt builders.
	(do_stmt_start): Fill in body directly.
	(lineno_stmt): Avoid setting lineno on constants.
	* c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST.
	Remove SCOPE_STMT.
	* c-semantics.c (begin_stmt_tree): Remove.
	(push_stmt_list, re_push_stmt_list, pop_stmt_list): New.
	(add_stmt): Use statement lists.
	(add_scope_stmt, finish_stmt_tree): Remove.
	(push_cleanup): New.
	* c-tree.h: Move some decls from c-common.h.
	* c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists.
	(do_case, c_finish_case): Likewise.
	(c_finish_then): Take body for then as argument.
	(c_finish_else): Similarly.
	(c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
	c_finish_for_stmt_incr, c_finish_for_stmt): New.
	(c_begin_stmt_expr, c_finish_stmt_expr): New.
	(c_begin_compound_stmt): Do scope management.
	(c_end_compound_stmt): New.
	* fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR.
	* gimplify.c (voidify_wrapper_expr): Accept temporary argument.
	Look through exception handling constructs.
	(gimplify_bind_expr): Accept temporary argument.
	(gimplify_target_expr): Special case BIND_EXPR bodies.
	(gimplify_expr): Handle fallback == fb_none like a statement.
	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill.
	* langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove.
	* langhooks.h (tree_chain_matters_p): Remove.
	* stub-objc.c (objc_clear_super_receiver): New.
	* tree-gimple.h (voidify_wrapper_expr): Update decl.
	(append_to_statement_list, append_to_statement_list_force): Move
	to tree-iterator.h.
	* tree-inline.c (expand_call_inline): Update call.
	(clone_body): Use statement lists.
	(walk_tree): Don't check tree_chain_matters_p.
	(copy_tree_r): Likewise.
	* tree-iterator.c (alloc_stmt_list): Clear lang bits.
	(tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly.
	* tree-iterator.h (append_to_statement_list,
	append_to_statement_list_force): Moved from tree-gimple.h.
	* tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump.
	* objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt.
	(objc_enter_block): Likewise.
	(objc_exit_block): Use c_end_compound_stmt.
	(objc_build_try_enter_fragment): Add #error and comment for
	rewriting for OBJCPLUS.
	(objc_build_extract_fragment, objc_build_try_epilogue,
	objc_build_catch_stmt, objc_build_finally_prologue,
	objc_build_finally_epilogue): Update for C statement builders.
	* objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P):
	Remove.
cp/
	* call.c (initialize_reference): Don't build CLEANUP_STMT here.
	* cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
	(genericize_try_block): Use gimplify_stmt.
	(genericize_catch_block, genericize_eh_spec_block): Likewise.
	(cp_gimplify_init_expr): Remove STMT_EXPR special case.
	(gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
	* cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
	(cp_tree_chain_matters_p): Remove.
	* cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
	(COMPOUND_STMT_BODY_BLOCK): New.
	(STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
	(EXPR_STMT_STMT_EXPR_RESULT): New.
	(building_stmt_tree): Check cur_stmt_list.
	(tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
	(BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
	* decl.c (poplevel): Use pop_stmt_list for minding cleanups.
	(cp_finish_decl): Use push_cleanup.
	(start_function, finish_function): Use statement lists.
	(finish_stmt): Do nothing.
	* except.c (begin_eh_spec_block): Use statement lists.
	(check_handlers_1, check_handlers): Likewise.
	* init.c (construct_virtual_base): Don't add extra compound stmts.
	(build_vec_init): Likewise.
	* name-lookup.c (maybe_push_cleanup_level): Use statement lists.
	* name-lookup.h (struct cp_binding_level): Add statement_list.
	* parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
	(cp_parser_labeled_statement, cp_parser_expression_statement,
	cp_parser_statement_seq_opt): Likewise.
	(cp_parser_compound_statement): Likewise.  Take bool for try block.
	(cp_parser_selection_statement): Tidy if processing.
	(cp_parser_already_scoped_statement): Rewrite to do what it says.
	* pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
	(tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
	Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
	* semantics.c (do_poplevel, do_pushlevel): Use statement lists.
	(finish_cond): New, rewritten from FINISH_COND.
	(simplify_loop_decl_cond): New.
	(finish_expr_stmt): Avoid nested EXPR_STMTs.
	(begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
	begin_else_clause, finish_else_clause, finish_if_stmt,
	begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
	begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
	finish_for_cond, finish_for_stmt, begin_switch_stmt,
	finish_switch_cond, finish_switch_stmt, begin_try_block,
	finish_try_block, finish_cleanup_try_block, finish_function_try_block,
	finish_handler_sequence, finish_function_handler_sequence,
	begin_handler, finish_handler_parms, finish_handler,
	begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
	using statement lists.
	(begin_compound_stmt): Replace has_no_scope argument with flags.
	Update all callers.  Use statement lists.
	(finish_compound_stmt): Likewise.
	(finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
	(current_scope_stmt_stack): Remove.
	(simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
	* typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
	Rewrite with statement lists.
testsuite/
	* g++.dg/ext/stmtexpr1.C: XFAIL.
	* gcc.dg/20030612-1.c: XFAIL.

From-SVN: r83221
2004-06-15 18:21:38 -07:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Andreas Jaeger 35b1a6faeb c-aux-info.c: Convert to ISO C99.
* c-aux-info.c: Convert to ISO C99.
	* c-pragma.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-convert.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-decl.c: Likewise
	* c-format.c: Likewise.
	* c-incpath.c: Likewise.
	* c-incpath.h: Likewise.

From-SVN: r68218
2003-06-19 21:43:59 +02:00
Nathanael Nerode 2bd3ecadd8 c-common.h (c_dump_tree), [...]): Change return type from 'int' to 'bool'.
(gcc)
	* c-common.h (c_dump_tree), c-dump.c (c_dump_tree),
	langhooks-def.h (lhd_tree_dump_dump_tree),
	langhooks.c (lhd_tree_dump_dump_tree), langhooks.h (*dump_tree):
	Change return type from 'int' to 'bool'.  Replace 0 and 1 with
	true and false in return statements.
(cp)
	* dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
	type from 'int' to 'bool'. Replace 0 and 1 with true and false in
	return statements.
(java)
	* lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
	Replace 0 and 1 with true and false in return statements.

From-SVN: r64596
2003-03-19 20:34:10 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Jason Merrill d65b1d77fd c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
* c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
        * c-common.def: Adjust.
        * c-dump.c (c_dump_tree): Adjust.
        * c-semantics.c (genrtl_return_stmt): Adjust.
        * c-pretty-print.c (pp_c_statement): Adjust.
        * tree-inline.c (copy_body_r): Adjust.

2002-08-22  Jason Merrill  <jason@redhat.com>

        * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
        * semantics.c (nullify_returns_r): Likewise.

From-SVN: r56523
2002-08-22 19:22:53 -04:00
Jason Merrill 558ee214f3 c-dump.c: Resurrect.
* c-dump.c: Resurrect.
        * tree-dump.c: Move C-specific stuff to c-dump.c.
        * c-common.h: Declare c_dump_tree.
        * c-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): Define.
        * Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
        (c-dump.o): New rule.
cp/
        * dump.c (cp_dump_tree): Call c_dump_tree.
        * Make-lang.in (CXX_C_OBJS): Add c-dump.o.

From-SVN: r55776
2002-07-26 09:45:38 -04:00
Bryce McKinlay 89d684bba3 tree-dump.c: Rename from c-dump.c.
* tree-dump.c: Rename from c-dump.c. Include c-tree.h, not c-common.h.
	(lang_type_quals): Declare.
	(dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to
	retrieve language-specific qualifiers for a type node, instead of
	C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of
	lang_dump_tree.
	* tree-dump.h: Rename from c-dump.h.
	* c-common.h (C_TYPE_QUALS): Removed.
	Move declarations for tree-dump.c interface to...
	* tree.h: ... here. Remove lang_dump_tree.
	* langhooks.h (struct lang_hooks_for_tree_dump): New.
	(struct lang_hooks): Add tree_dump hooks.
	* langhooks.c (lhd_tree_dump_dump_tree): New function.
	(lhd_tree_dump_type_quals): New function.
	* langhooks-def.h (lhd_tree_dump_dump_tree, lhd_tree_dump_type_quals):
	Declare.
	(LANG_HOOKS_INITIALIZER): Add tree_dump hooks.
	* Makefile.in: Move tree-dump.o to language-independent back-end.

cp:
	* cp-tree.h (CP_TYPE_QUALS): Removed.
	* decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
	* cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
	LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
	* dump.c (cp_dump_tree): Use void* dump_info argument to match
	lang-hooks prototype.
	* call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
	rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
	CP_TYPE_QUALS changed to cp_type_quals.
	* Make-lang.in: References to c-dump.h changed to tree-dump.h.
	(CXX_C_OBJS): Remove c-dump.o.

From-SVN: r47257
2001-11-22 02:33:02 +00:00
Joseph Myers 684d9f3beb ChangeLog.2, [...]: Fix spelling errors and typos.
* ChangeLog.2, ChangeLog.3, ChangeLog.4, FSFChangeLog.10,
	FSFChangeLog.11, c-common.c, c-common.def, c-common.h, c-decl.c,
	c-dump.c, c-typeck.c, except.c, sdbout.c, simplify-rtx.c,
	timevar.h, tree.h, varasm.c: Fix spelling errors and typos.

From-SVN: r46621
2001-10-29 23:01:45 +00:00
Kazu Hirata 2ba84f36ea c-common.h: Fix comment formatting.
* c-common.h: Fix comment formatting.
	* c-dump.c: Likewise.
	* cfg.c: Likewise.
	* diagnostic.h: Likewise.
	* except.c: Likewise.
	* gcc.h: Likewise.
	* gcov-io.h: Likewise.
	* genattrtab.c: Likewise.
	* output.h: Likewise.
	* predict.h: Likewise.
	* reload1.c: Likewise.
	* reload.h: Likewise.
	* resource.h: Likewise.
	* scan.h: Likewise.
	* system.h: Likewise.
	* tree.h: Likewise.
	* tree-inline.c: Likewise.
	* tsystem.h: Likewise.
	* varasm.c: Likewise.
	* xcoffout.h: Likewise.

From-SVN: r46122
2001-10-09 14:03:13 +00:00
Kaveh R. Ghazi 8b60264b0d builtins.c (expand_builtin_setjmp_receiver): Const-ify.
* builtins.c (expand_builtin_setjmp_receiver): Const-ify.
	* c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length):
	Likewise.
	* c-dump.c (dump_option_value_info): Likewise.
	* c-format.c (format_length_info, format_char_info,
	format_flag_spec, format_flag_pair, format_kind_info): Likewise.
	* collect2.c (names): Likewise.
	* cppdefault.h (default_include): Likewise.
	* cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise.
	* flow.c (life_analysis): Likewise.
	* gcc.c (dir_separator_str, modify_target, option_map,
	target_option_translations, spec_list_1, extra_specs_1,
	init_spec): Likewise.
	* gcov.c (gcov_version_string): Likewise.
	* genattr.c (write_units): Likewise.
	* genattrtab.c (make_length_attrs, write_function_unit_info): Likewise.
	* gengenrtl.c (rtx_definition, defs): Likewise.
	* genrecog.c (pred_table): Likewise.
	* global.c (global_alloc): Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (find_free_reg): Likewise.
	* params.h (param_info): Likewise.
	* predict.c (predictor_info): Likewise.
	* protoize.c (unexpansion_struct): Likewise.
	* real.c (bmask): Likewise.
	* recog.h (insn_operand_data, insn_data): Likewise.
	* regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.
	* toplev.c (da, debug_args, lang_opt, documented_lang_options,
	target_switches, target_options): Likewise.
	* tradcif.y (token, tokentab2, yylex): Likewise.
	* tree.h (attribute_spec): Likewise.

	* alpha.c (override_options, alpha_lookup_xfloating_lib_func):
	Likewise.
	* arc.c (arc_output_function_epilogue): Likewise.
	* arm.c (processors, all_cores, all_architectures,
	arm_override_options, isr_attribute_arg, isr_attribute_args,
	arm_isr_value): Likewise.
	* avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc):
	Likewise.
	* c4x.c (c4x_int_reglist): Likewise.
	* d30v.c (override_options): Likewise.
	* h8300.c (shift_insn): Likewise.
	* i386.c (size_cost, i386_cost, i486_cost, pentium_cost,
	pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost,
	ix86_expand_sse_comi, ix86_expand_sse_compare, override_options,
	builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg,
	ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise.
	* i386.h (processor_costs, ix86_cost): Likewise.
	* m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise.
	* m68hc11.h (processor_costs, m68hc11_cost): Likewise.
	* m68k.c (codes_68881, codes_FPA): Likewise.
	* m88k.c (mode_from_align, max_from_align, all_from_align,
	best_from_align, m_options): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* mcore.c (mode_from_align): Likewise.
	* mips/elf64.h (UNIQUE_SECTION): Likewise.
	* mips/iris6gld.h (UNIQUE_SECTION): Likewise.
	* mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise.
	* mips.h (mips_regno_to_class): Likewise.
	* ns32k.c (scales): Likewise.
	* pa.c (import_string, magic_milli): Likewise.
	* rs6000.c (alt_reg_names, rs6000_override_options): Likewise.
	* sparc.c (leaf_reg_remap, sparc_override_options,
	reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders):
	Likewise.
	* sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise.

cp:
	* class.c (build_vtable_entry_ref): Const-ify.
	* decl.c (predefined_identifier,
	initialize_predefined_identifiers): Likewise.
	* init.c (build_new_1): Likewise.
	* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
	Likewise.

f:
	* bad.c (_ffebad_message_, ffebad_messages_): Const-ify.
	* bld.c (ffebld_arity_op_): Likewise.
	* bld.h (ffebld_arity_op_): Likewise.
	* com.c (ffecom_init_0): Likewise.
	* intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, names, gens, imps, specs, cc_pair,
	cc_descriptions, cc_summaries): Likewise.
	* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_,
	ffeintrin_imps_, ffeintrin_specs_): Likewise.

java:
	* jcf-io.c (format_uint): Const-ify.
	* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
	* lex.c (java_get_line_col): Likewise.
	* parse.y (build_incdec): Likewise.

From-SVN: r46062
2001-10-07 16:51:11 +00:00
Nathan Sidwell baff6e5433 for some reason this was missed in the
2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>

	* c-common.h (tree_dump_index): Add more comments.
	* c-dump.c (dump_files): Name flags `tree' rather than `ast'.
	(dump_option_value_info): New struct.
	(dump_options): New array.
	(dump_switch_p): Parse switch options symbolically.
	* doc/invoke.texi (-fdump-ast): Rename to ...
	(-fdump-tree): ... here. Document that options are symbolic, and
	not all are applicable.
commit

From-SVN: r45433
2001-09-06 08:53:49 +00:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Kazu Hirata ec5c56db8b alias.c: Fix comment formatting.
* alias.c: Fix comment formatting.
	* bitmap.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-dump.c: Likewise.
	* c-lex.c: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* conflict.c: Likewise.
	* cppfiles.c: Likewise.
	* cppinit.c: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* cppspec.c: Likewise.
	* c-pragma.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* c-semantics.c: Likewise.
	* c-typeck.c: Likewise.

From-SVN: r44547
2001-08-01 17:57:27 +00:00
Nathan Sidwell 6be777481e c-common.h (TDI_inlined): New ast dump phase.
* c-common.h (TDI_inlined): New ast dump phase.
	(dump_flag_name): New function.
	* c-dump.c (dump_files): Add inlined phase.
	(dump_flag_name): Define.
	* doc/invoke.texi (-fdump-ast-inlined): Document.
cp:
	* optimize.c (optimize_inline_calls): New function, broken out
	of ...
	(optimize_function): ... here. Call it. Don't inline if it is
	a thunk.
	(dump_function): Print name of dump flag causing this dump.
	* semantics.c (expand_body): Move thunk inline check to
	optimize_function.

From-SVN: r43687
2001-07-02 12:16:58 +00:00
Nathan Sidwell b7442fb555 c-common.h (flag_dump_translation_unit): Remove.
* c-common.h (flag_dump_translation_unit): Remove.
	(enum tree_dump_index): Define.
	(TDF_ADDRESS, TDF_SLIM): New #defines.
	(dump_node_to_file): Remove.
	(dump_node): Make extern. Add flags.
	(dump_flag, dump_enabled_p, dump_begin, dump_end,
	dump_switch_p): Prototype.
	* c-common.c (flag_dump_translation_unit): Remove.
	* c-decl.c (c_decode_option): Remove -fdump-translation-unit
	logic. Use dump_switch_p.
	* c-dump.h (struct dump_info): Add node and user fields.
	(dump_pointer): Declare.
	* c-dump.c (dump_node): Make extern. Add flags.
	(SOL_COLUMN, EOL_COLUMN, COLUMN_ALIGNMENT): New #defines.
	(dump_new_line, dump_maybe_newline): Use them.
	(dump_pointer): New function.
	(dequeue_and_dump): Check TDF_SLIM before dumping a _DECL's
	chain or function's body. Dump address, if TDF_ADDRESS set.
	(dump_flag): Define.
	(dump_node_to_file): Remove.
	(struct dump_file_info): New struct.
	(dump_files): New array.
	(dump_begin, dump_end, dump_enabled_p, dump_switch_p): Define.
	* c-lang.c (finish_file): Adjust dumping.
	* toplev.h (dump_base_name): Make extern.
	* invoke.texi: Document new flags.
cp:
	* class.c (maybe_indent_hierarchy): New function.
	(dump_class_hierarchy_r): Add flags. Dump extra binfo
	information, if enabled. Use maybe_indent_hierarchy. Adjust
	output format.
	(dump_class_hierarchy): Adjust prototype. Adjust output format.
	(dump_array, dump_vtable, dump_vtt): New functions.
	(finish_struct_1): Adjust hierarchy dumping.
	(initialize_vtable): Call dump_vtable.
	(build_vtt): Call dump_vtt.
	(build_ctor_vtbl_group): Call dump_vtable.
	* decl2.c (flag_dump_class_layout): Remove.
	(cxx_decode_option): Remove dump translation unit
	and dump class hierarchy check. Call dump_switch_p.
	(finish_file): Adjust dumping.
	(dump.c): Only dump base classes if not TDF_SLIM.
	Only dump namespace members if not TDF_SLIM.
	* optimize.c (dump_function): New function.
	(optimize_function): Call dump_function.
	* semantics.c (expand_body): Use dump_enabled_p.

From-SVN: r42896
2001-06-05 08:03:45 +00:00
Mark Mitchell c64539a845 c-dump.c (dequeue_and_dump): Don't look at DECL_ASSEMBLER_NAME if it is not set.
* c-dump.c (dequeue_and_dump): Don't look at DECL_ASSEMBLER_NAME
	if it is not set.

From-SVN: r41788
2001-05-03 15:41:13 +00:00
Mark Mitchell 13507bd80d c-dump.c (dequeue_and_dump): Dump function bodies.
* c-dump.c (dequeue_and_dump): Dump function bodies.

	* dump.c (cp_dump_tree): Don't dump function bodies here.

From-SVN: r37359
2000-11-10 04:50:53 +00:00
Mark Mitchell 0a7394bc1a Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
* Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
	(c-dump.o): New target.
	* c-common.h (flag_dump_translation_unit): New variable.
	(C_TYPE_QUALS): New macro.
	(strip_array_types): New function.
	(DECL_C_BIT_FIELD): New macro.
	(SET_DECL_C_BIT_FIELD): Likewise.
	(CLEAR_DECL_C_BIT_FIELD): Likewise.
	(dump_info_p): New typedef.
	(dump_tree_fn): Likewise.
	(lang_dump_tree): New variable.
	(dump_node_to_file): New function.
	* c-common.c (flag_dump_translation_unit): Define it.
	(strip_array_types): New function.
	* c-decl.c (c_decode_option): Handle -fdump-translation-unit.
	* c-lang.c (finish_file): Call dump_node_to_file if
	flag_dump_translation_unit.
	* c-semantics.c (mark_rtl_for_local_static): Fix typo in comment.
	* c-tree.h (DECL_C_BIT_FIELD): Remove declaration.
	* c-dump.c: New file.

	* Make-lang.in (CXX_C_OBJS): Add c-dump.o.
	(dump.o): Update dependency list.
	* cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
	(flag_dump_translation_unit): Likewise.
	(CP_TYPE_QUALS): Adjust definition.
	(DECL_C_BIT_FIELD): Remove.
	(SET_DECL_C_BIT_FIELD): Likewise.
	(CLEAR_DECL_C_BIT_FIELD): Likewise.
	(add_maybe_template): Likewise.
	(strip_array_types): Likewise.
	(dump_node_to_file): Likewise.
	(cp_dump_tree): New function.
	* decl.c (init_decl_processing): Set lang_dump_tree.
	* decl2.c (flag_dump_translation_unit): Remove.
	* dump.c: Move most of it to ../c-dump.c.
	(cp_dump_tree): New function.
	* pt.c (add_maybe_template): Remove.
	* typeck.c (strip_array_types): Likewise.

From-SVN: r37358
2000-11-10 04:29:45 +00:00