public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH INSTALLED]: const typedefs part 19/N
@ 2007-08-27  5:22 Kaveh R. GHAZI
  2007-08-27 14:35 ` Daniel Berlin
  0 siblings, 1 reply; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-27  5:22 UTC (permalink / raw)
  To: gcc-patches

This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
random predicates.

Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
cross-compile farm to check platforms with other debug-types activating
different debugging code in the various *out.c files.  I didn't see any
relevant warnings from building cc1 to those targets.

Installed on mainline.

		--Kaveh



2007-08-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* alias.c (memory_modified_1, memory_modified_in_insn_p):
	Constify.
	* basic-block.h (tree_predicted_by_p, rtl_predicted_by_p):
	Likewise.
	* bb-reorder.c (copy_bb_p): Likewise.
	* cfghooks.c (can_remove_branch_p, can_merge_blocks_p,
	predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
	block_ends_with_condjump_p): Likewise.
	* cfghooks.h (can_remove_branch_p, can_merge_blocks_p,
	predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
	block_ends_with_condjump_p): Likewise.
	* cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise.
	* cfgrtl.c (can_delete_note_p, can_delete_label_p,
	rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p,
	rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p,
	need_fake_edge_p, rtl_can_remove_branch_p): Likewise.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use
	debug_true_const_tree instad of debug_true_tree.
	* debug.c (do_nothing_debug_hooks): Likewise.
	* debug.h (ignore_block, debug_true_const_tree): Constify.
	* dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save,
	dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type,
	decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc,
	same_dw_val_p, add_ranges, is_subrange_type, type_is_enum,
	dbx_reg_number, is_based_loc, field_type,
	simple_type_align_in_bits, simple_decl_align_in_bits,
	simple_type_size_in_bits, field_byte_offset, insert_float,
	type_tag, member_declared_type, is_redundant_typedef,
	secname_for_decl, is_inlined_entry_point): Likewise.
	* emit-rtl.c (const_next_insn, const_previous_insn,
	const_next_nonnote_insn, const_prev_nonnote_insn,
	const_next_real_insn, const_prev_real_insn,
	const_next_active_insn, const_prev_active_insn, const_next_label,
	const_prev_label): Likewise.
	* except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region):
	Likewise.
	* haifa-sched.c (may_trap_exp, haifa_classify_insn,
	find_set_reg_weight, no_real_insns_p, find_set_reg_weight,
	sched_insn_is_legitimate_for_speculation_p): Likewise.
	* jump.c (reversed_comparison_code_parts,
	reversed_comparison_code, reversed_comparison, condjump_label):
	Likewise.
	* predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise.
	* reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned):
	Likewise.
	* rtl.h (const_previous_insn, const_next_insn,
	const_prev_nonnote_insn, const_next_nonnote_insn,
	const_prev_real_insn, const_next_real_insn,
	const_prev_active_insn, const_next_active_insn, const_prev_label,
	const_next_label, modified_between_p, modified_in_p,
	const_note_storeskeep_with_call_p, condjump_label,
	reversed_comparison, reversed_comparison_code,
	reversed_comparison_code_parts, memory_modified_in_insn_p,
	stack_regs_mentioned): Likewise.
	* rtlanal.c (modified_between_p, modified_in_p, const_note_stores,
	keep_with_call_p): Likewise.
	* sched-deps.c (deps_may_trap_p, sched_get_condition,
	conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list,
	sd_lists_size, sd_lists_empty_p): Likewise.
	* sched-int.h (sched_insns_conditions_mutex_p,
	haifa_classify_insn, no_real_insns_p,
	sched_insn_is_legitimate_for_speculation_p, sd_next_list,
	sd_lists_size, sd_lists_empty_p): Likewise.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt,
	stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p,
	-tree_block_ends_with_call_p, tree_block_ends_with_condjump_p):
	Likewise.
	* tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region,
	tree_can_throw_internal): Likewise.
	* tree-flow-inline.h (phi_nodes): Likewise.
	* tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt,
	tree_can_throw_internal, lookup_stmt_eh_region): Likewise.
	* tree-gimple.c (const_get_call_expr_in): Likewise.
	* tree-gimple.h (const_get_call_expr_in): Likewise.
	* tree.c (const_lookup_attribute, attribute_list_equal,
	attribute_list_contained): Likewise.
	* tree.h (attribute_list_equal, attribute_list_contained,
	const_lookup_attribute): Likewise.
	* vmsdbgout.c (vmsdbgout_ignore_block): Likewise.

diff -rup orig/egcc-SVN20070825/gcc/alias.c egcc-SVN20070825/gcc/alias.c
--- orig/egcc-SVN20070825/gcc/alias.c	2007-08-23 12:12:27.000000000 -0400
+++ egcc-SVN20070825/gcc/alias.c	2007-08-25 15:53:27.444490338 -0400
@@ -167,7 +167,7 @@ static rtx adjust_offset_for_component_r
 static int nonoverlapping_memrefs_p (const_rtx, const_rtx);
 static int write_dependence_p (const_rtx, const_rtx, int);

-static void memory_modified_1 (rtx, const_rtx, void *);
+static void memory_modified_1 (const_rtx, const_rtx, const void *);
 static void record_alias_subset (alias_set_type, alias_set_type);

 /* Set up all info needed to perform alias analysis on memory references.  */
@@ -2354,11 +2354,11 @@ init_alias_once (void)
    to be memory reference.  */
 static bool memory_modified;
 static void
-memory_modified_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
+memory_modified_1 (const_rtx x, const_rtx pat ATTRIBUTE_UNUSED, const void *data)
 {
   if (MEM_P (x))
     {
-      if (anti_dependence (x, (rtx)data) || output_dependence (x, (rtx)data))
+      if (anti_dependence (x, (const_rtx)data) || output_dependence (x, (const_rtx)data))
 	memory_modified = true;
     }
 }
@@ -2367,12 +2367,12 @@ memory_modified_1 (rtx x, const_rtx pat
 /* Return true when INSN possibly modify memory contents of MEM
    (i.e. address can be modified).  */
 bool
-memory_modified_in_insn_p (rtx mem, rtx insn)
+memory_modified_in_insn_p (const_rtx mem, const_rtx insn)
 {
   if (!INSN_P (insn))
     return false;
   memory_modified = false;
-  note_stores (PATTERN (insn), memory_modified_1, mem);
+  const_note_stores (PATTERN (insn), memory_modified_1, mem);
   return memory_modified;
 }

diff -rup orig/egcc-SVN20070825/gcc/basic-block.h egcc-SVN20070825/gcc/basic-block.h
--- orig/egcc-SVN20070825/gcc/basic-block.h	2007-08-14 01:01:51.000000000 -0400
+++ egcc-SVN20070825/gcc/basic-block.h	2007-08-25 13:28:55.871340138 -0400
@@ -830,8 +830,8 @@ extern void compute_available (sbitmap *
 extern bool maybe_hot_bb_p (const_basic_block);
 extern bool probably_cold_bb_p (const_basic_block);
 extern bool probably_never_executed_bb_p (const_basic_block);
-extern bool tree_predicted_by_p (basic_block, enum br_predictor);
-extern bool rtl_predicted_by_p (basic_block, enum br_predictor);
+extern bool tree_predicted_by_p (const_basic_block, enum br_predictor);
+extern bool rtl_predicted_by_p (const_basic_block, enum br_predictor);
 extern void tree_predict_edge (edge, enum br_predictor, int);
 extern void rtl_predict_edge (edge, enum br_predictor, int);
 extern void predict_edge_def (edge, enum br_predictor, enum prediction);
diff -rup orig/egcc-SVN20070825/gcc/bb-reorder.c egcc-SVN20070825/gcc/bb-reorder.c
--- orig/egcc-SVN20070825/gcc/bb-reorder.c	2007-08-14 01:01:48.000000000 -0400
+++ egcc-SVN20070825/gcc/bb-reorder.c	2007-08-25 13:48:05.253514060 -0400
@@ -176,7 +176,7 @@ static basic_block copy_bb (basic_block,
 static fibheapkey_t bb_to_key (basic_block);
 static bool better_edge_p (const_basic_block, const_edge, int, int, int, int, const_edge);
 static void connect_traces (int, struct trace *);
-static bool copy_bb_p (basic_block, int);
+static bool copy_bb_p (const_basic_block, int);
 static int get_uncond_jump_length (void);
 static bool push_to_next_round_p (const_basic_block, int, int, int, gcov_type);
 static void find_rarely_executed_basic_blocks_and_crossing_edges (edge **,
@@ -1156,7 +1156,7 @@ connect_traces (int n_traces, struct tra
    when code size is allowed to grow by duplication.  */

 static bool
-copy_bb_p (basic_block bb, int code_may_grow)
+copy_bb_p (const_basic_block bb, int code_may_grow)
 {
   int size = 0;
   int max_size = uncond_jump_length;
diff -rup orig/egcc-SVN20070825/gcc/cfghooks.c egcc-SVN20070825/gcc/cfghooks.c
--- orig/egcc-SVN20070825/gcc/cfghooks.c	2007-07-26 23:03:39.000000000 -0400
+++ egcc-SVN20070825/gcc/cfghooks.c	2007-08-25 13:43:28.874649100 -0400
@@ -321,7 +321,7 @@ redirect_edge_and_branch (edge e, basic_
    to the destination of the other edge going from its source.  */

 bool
-can_remove_branch_p (edge e)
+can_remove_branch_p (const_edge e)
 {
   if (!cfg_hooks->can_remove_branch_p)
     internal_error ("%s does not support can_remove_branch_p",
@@ -616,7 +616,7 @@ create_empty_bb (basic_block after)
 /* Checks whether we may merge blocks BB1 and BB2.  */

 bool
-can_merge_blocks_p (basic_block bb1, basic_block bb2)
+can_merge_blocks_p (const_basic_block bb1, const_basic_block bb2)
 {
   bool ret;

@@ -638,7 +638,7 @@ predict_edge (edge e, enum br_predictor
 }

 bool
-predicted_by_p (basic_block bb, enum br_predictor predictor)
+predicted_by_p (const_basic_block bb, enum br_predictor predictor)
 {
   if (!cfg_hooks->predict_edge)
     internal_error ("%s does not support predicted_by_p", cfg_hooks->name);
@@ -839,7 +839,7 @@ tidy_fallthru_edges (void)
 /* Returns true if we can duplicate basic block BB.  */

 bool
-can_duplicate_block_p (basic_block bb)
+can_duplicate_block_p (const_basic_block bb)
 {
   if (!cfg_hooks->can_duplicate_block_p)
     internal_error ("%s does not support can_duplicate_block_p",
@@ -938,7 +938,7 @@ duplicate_block (basic_block bb, edge e,
    instructions that must stay with the call, 0 otherwise.  */

 bool
-block_ends_with_call_p (basic_block bb)
+block_ends_with_call_p (const_basic_block bb)
 {
   if (!cfg_hooks->block_ends_with_call_p)
     internal_error ("%s does not support block_ends_with_call_p", cfg_hooks->name);
@@ -949,7 +949,7 @@ block_ends_with_call_p (basic_block bb)
 /* Return 1 if BB ends with a conditional branch, 0 otherwise.  */

 bool
-block_ends_with_condjump_p (basic_block bb)
+block_ends_with_condjump_p (const_basic_block bb)
 {
   if (!cfg_hooks->block_ends_with_condjump_p)
     internal_error ("%s does not support block_ends_with_condjump_p",
diff -rup orig/egcc-SVN20070825/gcc/cfghooks.h egcc-SVN20070825/gcc/cfghooks.h
--- orig/egcc-SVN20070825/gcc/cfghooks.h	2007-07-26 23:03:39.000000000 -0400
+++ egcc-SVN20070825/gcc/cfghooks.h	2007-08-25 13:43:07.006060248 -0400
@@ -48,7 +48,7 @@ struct cfg_hooks

   /* Returns true if it is possible to remove the edge by redirecting it
      to the destination of the other edge going from its source.  */
-  bool (*can_remove_branch_p) (edge);
+  bool (*can_remove_branch_p) (const_edge);

   /* Remove statements corresponding to a given basic block.  */
   void (*delete_basic_block) (basic_block);
@@ -61,7 +61,7 @@ struct cfg_hooks
   bool (*move_block_after) (basic_block b, basic_block a);

   /* Return true when blocks A and B can be merged into single basic block.  */
-  bool (*can_merge_blocks_p) (basic_block a, basic_block b);
+  bool (*can_merge_blocks_p) (const_basic_block a, const_basic_block b);

   /* Merge blocks A and B.  */
   void (*merge_blocks) (basic_block a, basic_block b);
@@ -71,10 +71,10 @@ struct cfg_hooks

   /* Return true if the one of outgoing edges is already predicted by
      PREDICTOR.  */
-  bool (*predicted_by_p) (basic_block bb, enum br_predictor predictor);
+  bool (*predicted_by_p) (const_basic_block bb, enum br_predictor predictor);

   /* Return true when block A can be duplicated.  */
-  bool (*can_duplicate_block_p) (basic_block a);
+  bool (*can_duplicate_block_p) (const_basic_block a);

   /* Duplicate block A.  */
   basic_block (*duplicate_block) (basic_block a);
@@ -89,11 +89,11 @@ struct cfg_hooks

   /* Say whether a block ends with a call, possibly followed by some
      other code that must stay with the call.  */
-  bool (*block_ends_with_call_p) (basic_block);
+  bool (*block_ends_with_call_p) (const_basic_block);

   /* Say whether a block ends with a conditional branch.  Switches
      and unconditional branches do not qualify.  */
-  bool (*block_ends_with_condjump_p) (basic_block);
+  bool (*block_ends_with_condjump_p) (const_basic_block);

   /* Add fake edges to the function exit for any non constant and non noreturn
      calls, volatile inline assembly in the bitmap of blocks specified by
@@ -141,7 +141,7 @@ extern void verify_flow_info (void);
 extern void dump_bb (basic_block, FILE *, int);
 extern edge redirect_edge_and_branch (edge, basic_block);
 extern basic_block redirect_edge_and_branch_force (edge, basic_block);
-extern bool can_remove_branch_p (edge);
+extern bool can_remove_branch_p (const_edge);
 extern void remove_branch (edge);
 extern void remove_edge (edge);
 extern edge split_block (basic_block, void *);
@@ -151,18 +151,18 @@ extern void delete_basic_block (basic_bl
 extern basic_block split_edge (edge);
 extern basic_block create_basic_block (void *, void *, basic_block);
 extern basic_block create_empty_bb (basic_block);
-extern bool can_merge_blocks_p (basic_block, basic_block);
+extern bool can_merge_blocks_p (const_basic_block, const_basic_block);
 extern void merge_blocks (basic_block, basic_block);
 extern edge make_forwarder_block (basic_block, bool (*)(edge),
 				  void (*) (basic_block));
 extern void tidy_fallthru_edge (edge);
 extern void tidy_fallthru_edges (void);
 extern void predict_edge (edge e, enum br_predictor predictor, int probability);
-extern bool predicted_by_p (basic_block bb, enum br_predictor predictor);
-extern bool can_duplicate_block_p (basic_block);
+extern bool predicted_by_p (const_basic_block bb, enum br_predictor predictor);
+extern bool can_duplicate_block_p (const_basic_block);
 extern basic_block duplicate_block (basic_block, edge, basic_block);
-extern bool block_ends_with_call_p (basic_block bb);
-extern bool block_ends_with_condjump_p (basic_block bb);
+extern bool block_ends_with_call_p (const_basic_block bb);
+extern bool block_ends_with_condjump_p (const_basic_block bb);
 extern int flow_call_edges_add (sbitmap);
 extern void execute_on_growing_pred (edge);
 extern void execute_on_shrinking_pred (edge);
diff -rup orig/egcc-SVN20070825/gcc/cfglayout.c egcc-SVN20070825/gcc/cfglayout.c
--- orig/egcc-SVN20070825/gcc/cfglayout.c	2007-07-28 23:02:58.000000000 -0400
+++ egcc-SVN20070825/gcc/cfglayout.c	2007-08-25 13:32:32.542100628 -0400
@@ -1019,10 +1019,10 @@ force_one_exit_fallthru (void)
    only be used through the cfghooks interface, and we do not want to move
    it to cfgrtl.c since it would require also moving quite a lot of related
    code.  */
-extern bool cfg_layout_can_duplicate_bb_p (basic_block);
+extern bool cfg_layout_can_duplicate_bb_p (const_basic_block);

 bool
-cfg_layout_can_duplicate_bb_p (basic_block bb)
+cfg_layout_can_duplicate_bb_p (const_basic_block bb)
 {
   /* Do not attempt to duplicate tablejumps, as we need to unshare
      the dispatch table.  This is difficult to do, as the instructions
diff -rup orig/egcc-SVN20070825/gcc/cfgrtl.c egcc-SVN20070825/gcc/cfgrtl.c
--- orig/egcc-SVN20070825/gcc/cfgrtl.c	2007-08-14 11:34:24.000000000 -0400
+++ egcc-SVN20070825/gcc/cfgrtl.c	2007-08-25 14:02:33.230824273 -0400
@@ -62,8 +62,8 @@ along with GCC; see the file COPYING3.
 #include "tree-pass.h"
 #include "df.h"

-static int can_delete_note_p (rtx);
-static int can_delete_label_p (rtx);
+static int can_delete_note_p (const_rtx);
+static int can_delete_label_p (const_rtx);
 static void commit_one_edge_insertion (edge);
 static basic_block rtl_split_edge (edge);
 static bool rtl_move_block_after (basic_block, basic_block);
@@ -84,7 +84,7 @@ static void rtl_make_forwarder_block (ed
    so that we may simply delete it.  */

 static int
-can_delete_note_p (rtx note)
+can_delete_note_p (const_rtx note)
 {
   return (NOTE_KIND (note) == NOTE_INSN_DELETED
 	  || NOTE_KIND (note) == NOTE_INSN_BASIC_BLOCK);
@@ -93,7 +93,7 @@ can_delete_note_p (rtx note)
 /* True if a given label can be deleted.  */

 static int
-can_delete_label_p (rtx label)
+can_delete_label_p (const_rtx label)
 {
   return (!LABEL_PRESERVE_P (label)
 	  /* User declared labels must be preserved.  */
@@ -625,7 +625,8 @@ rtl_merge_blocks (basic_block a, basic_b

 /* Return true when block A and B can be merged.  */
 static bool
-rtl_can_merge_blocks (basic_block a,basic_block b)
+
+rtl_can_merge_blocks (const_basic_block a, const_basic_block b)
 {
   /* If we are partitioning hot/cold basic blocks, we don't want to
      mess up unconditional or indirect jumps that cross between hot
@@ -2530,7 +2531,7 @@ cfg_layout_delete_block (basic_block bb)

 /* Return true when blocks A and B can be safely merged.  */
 static bool
-cfg_layout_can_merge_blocks_p (basic_block a, basic_block b)
+cfg_layout_can_merge_blocks_p (const_basic_block a, const_basic_block b)
 {
   /* If we are partitioning hot/cold basic blocks, we don't want to
      mess up unconditional or indirect jumps that cross between hot
@@ -2686,7 +2687,7 @@ rtl_make_forwarder_block (edge fallthru
    instructions that must stay with the call, 0 otherwise.  */

 static bool
-rtl_block_ends_with_call_p (basic_block bb)
+rtl_block_ends_with_call_p (const_basic_block bb)
 {
   rtx insn = BB_END (bb);

@@ -2700,7 +2701,7 @@ rtl_block_ends_with_call_p (basic_block
 /* Return 1 if BB ends with a conditional branch, 0 otherwise.  */

 static bool
-rtl_block_ends_with_condjump_p (basic_block bb)
+rtl_block_ends_with_condjump_p (const_basic_block bb)
 {
   return any_condjump_p (BB_END (bb));
 }
@@ -2709,7 +2710,7 @@ rtl_block_ends_with_condjump_p (basic_bl
    Helper function for rtl_flow_call_edges_add.  */

 static bool
-need_fake_edge_p (rtx insn)
+need_fake_edge_p (const_rtx insn)
 {
   if (!INSN_P (insn))
     return false;
@@ -3012,11 +3013,11 @@ insert_insn_end_bb_new (rtx pat, basic_b
    it to the destination of the other edge from E->src.  */

 static bool
-rtl_can_remove_branch_p (edge e)
+rtl_can_remove_branch_p (const_edge e)
 {
-  basic_block src = e->src;
-  basic_block target = EDGE_SUCC (src, EDGE_SUCC (src, 0) == e)->dest;
-  rtx insn = BB_END (src), set;
+  const_basic_block src = e->src;
+  const_basic_block target = EDGE_SUCC (src, EDGE_SUCC (src, 0) == e)->dest;
+  const_rtx insn = BB_END (src), set;

   /* The conditions are taken from try_redirect_by_replacing_jump.  */
   if (target == EXIT_BLOCK_PTR)
@@ -3082,7 +3083,7 @@ struct cfg_hooks rtl_cfg_hooks = {
    should only be used through the cfghooks interface, and we do not want to
    move them here since it would require also moving quite a lot of related
    code.  They are in cfglayout.c.  */
-extern bool cfg_layout_can_duplicate_bb_p (basic_block);
+extern bool cfg_layout_can_duplicate_bb_p (const_basic_block);
 extern basic_block cfg_layout_duplicate_bb (basic_block);

 struct cfg_hooks cfg_layout_rtl_cfg_hooks = {
diff -rup orig/egcc-SVN20070825/gcc/dbxout.c egcc-SVN20070825/gcc/dbxout.c
--- orig/egcc-SVN20070825/gcc/dbxout.c	2007-08-18 20:02:30.000000000 -0400
+++ egcc-SVN20070825/gcc/dbxout.c	2007-08-25 17:29:35.109917407 -0400
@@ -353,7 +353,7 @@ const struct gcc_debug_hooks dbx_debug_h
   dbxout_end_source_file,
   dbxout_begin_block,
   dbxout_end_block,
-  debug_true_tree,		         /* ignore_block */
+  debug_true_const_tree,	         /* ignore_block */
   dbxout_source_line,		         /* source_line */
   dbxout_begin_prologue,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
@@ -389,7 +389,7 @@ const struct gcc_debug_hooks xcoff_debug
   dbxout_end_source_file,
   xcoffout_begin_block,
   xcoffout_end_block,
-  debug_true_tree,		         /* ignore_block */
+  debug_true_const_tree,	         /* ignore_block */
   xcoffout_source_line,
   xcoffout_begin_prologue,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
diff -rup orig/egcc-SVN20070825/gcc/debug.c egcc-SVN20070825/gcc/debug.c
--- orig/egcc-SVN20070825/gcc/debug.c	2007-07-26 23:03:42.000000000 -0400
+++ egcc-SVN20070825/gcc/debug.c	2007-08-25 17:27:46.361262900 -0400
@@ -32,7 +32,7 @@ const struct gcc_debug_hooks do_nothing_
   debug_nothing_int,
   debug_nothing_int_int,	         /* begin_block */
   debug_nothing_int_int,	         /* end_block */
-  debug_true_tree,		         /* ignore_block */
+  debug_true_const_tree,	         /* ignore_block */
   debug_nothing_int_charstar,	         /* source_line */
   debug_nothing_int_charstar,	         /* begin_prologue */
   debug_nothing_int_charstar,	         /* end_prologue */
@@ -72,7 +72,7 @@ debug_nothing_tree_tree (tree t1 ATTRIBU
 }

 bool
-debug_true_tree (tree block ATTRIBUTE_UNUSED)
+debug_true_const_tree (const_tree block ATTRIBUTE_UNUSED)
 {
   return true;
 }
diff -rup orig/egcc-SVN20070825/gcc/debug.h egcc-SVN20070825/gcc/debug.h
--- orig/egcc-SVN20070825/gcc/debug.h	2007-08-18 20:02:29.000000000 -0400
+++ egcc-SVN20070825/gcc/debug.h	2007-08-25 17:27:53.862590957 -0400
@@ -56,7 +56,7 @@ struct gcc_debug_hooks
      instructions.  This may not be the case for blocks containing
      nested functions, since we may actually call such a function even
      though the BLOCK information is messed up.  Defaults to true.  */
-  bool (* ignore_block) (tree);
+  bool (* ignore_block) (const_tree);

   /* Record a source file location at (FILE, LINE).  */
   void (* source_line) (unsigned int line, const char *file);
@@ -140,7 +140,7 @@ extern void debug_nothing_int_int (unsig
 extern void debug_nothing_tree (tree);
 extern void debug_nothing_tree_int (tree, int);
 extern void debug_nothing_tree_tree (tree, tree);
-extern bool debug_true_tree (tree);
+extern bool debug_true_const_tree (const_tree);
 extern void debug_nothing_rtx (rtx);

 /* Hooks for various debug formats.  */
diff -rup orig/egcc-SVN20070825/gcc/dwarf2out.c egcc-SVN20070825/gcc/dwarf2out.c
--- orig/egcc-SVN20070825/gcc/dwarf2out.c	2007-08-21 20:03:29.000000000 -0400
+++ egcc-SVN20070825/gcc/dwarf2out.c	2007-08-25 17:22:35.939995224 -0400
@@ -354,12 +354,12 @@ static void reg_save (const char *, unsi
 #ifdef DWARF2_UNWIND_INFO
 static void initial_return_save (rtx);
 #endif
-static HOST_WIDE_INT stack_adjust_offset (rtx);
+static HOST_WIDE_INT stack_adjust_offset (const_rtx);
 static void output_cfi (dw_cfi_ref, dw_fde_ref, int);
 static void output_call_frame_info (int);
 static void dwarf2out_stack_adjust (rtx, bool);
 static void flush_queued_reg_saves (void);
-static bool clobbers_queued_reg_save (rtx);
+static bool clobbers_queued_reg_save (const_rtx);
 static void dwarf2out_frame_debug_expr (rtx, const char *);

 /* Support for complex CFA locations.  */
@@ -1025,10 +1025,10 @@ initial_return_save (rtx rtl)
    contains.  */

 static HOST_WIDE_INT
-stack_adjust_offset (rtx pattern)
+stack_adjust_offset (const_rtx pattern)
 {
-  rtx src = SET_SRC (pattern);
-  rtx dest = SET_DEST (pattern);
+  const_rtx src = SET_SRC (pattern);
+  const_rtx dest = SET_DEST (pattern);
   HOST_WIDE_INT offset = 0;
   enum rtx_code code;

@@ -1286,7 +1286,7 @@ flush_queued_reg_saves (void)
    have a new location for?  */

 static bool
-clobbers_queued_reg_save (rtx insn)
+clobbers_queued_reg_save (const_rtx insn)
 {
   struct queued_reg_save *q;

@@ -3651,7 +3651,7 @@ static void dwarf2out_start_source_file
 static void dwarf2out_end_source_file (unsigned);
 static void dwarf2out_begin_block (unsigned, unsigned);
 static void dwarf2out_end_block (unsigned, unsigned);
-static bool dwarf2out_ignore_block (tree);
+static bool dwarf2out_ignore_block (const_tree);
 static void dwarf2out_global_decl (tree);
 static void dwarf2out_type_decl (tree, int);
 static void dwarf2out_imported_module_or_decl (tree, tree);
@@ -4069,14 +4069,14 @@ static HOST_WIDE_INT frame_pointer_fb_of

 /* Forward declarations for functions defined in this file.  */

-static int is_pseudo_reg (rtx);
+static int is_pseudo_reg (const_rtx);
 static tree type_main_variant (tree);
-static int is_tagged_type (tree);
+static int is_tagged_type (const_tree);
 static const char *dwarf_tag_name (unsigned);
 static const char *dwarf_attr_name (unsigned);
 static const char *dwarf_form_name (unsigned);
-static tree decl_ultimate_origin (tree);
-static tree block_ultimate_origin (tree);
+static tree decl_ultimate_origin (const_tree);
+static tree block_ultimate_origin (const_tree);
 static tree decl_class_context (tree);
 static void add_dwarf_attr (dw_die_ref, dw_attr_ref);
 static inline enum dw_val_class AT_class (dw_attr_ref);
@@ -4139,7 +4139,7 @@ static int decl_die_table_eq (const void
 static dw_die_ref lookup_decl_die (tree);
 static hashval_t decl_loc_table_hash (const void *);
 static int decl_loc_table_eq (const void *, const void *);
-static var_loc_list *lookup_decl_loc (tree);
+static var_loc_list *lookup_decl_loc (const_tree);
 static void equate_decl_number_to_die (tree, dw_die_ref);
 static void add_var_loc_to_decl (tree, struct var_loc_node *);
 static void print_spaces (FILE *);
@@ -4151,7 +4151,7 @@ static void loc_checksum (dw_loc_descr_r
 static void attr_checksum (dw_attr_ref, struct md5_ctx *, int *);
 static void die_checksum (dw_die_ref, struct md5_ctx *, int *);
 static int same_loc_p (dw_loc_descr_ref, dw_loc_descr_ref, int *);
-static int same_dw_val_p (dw_val_node *, dw_val_node *, int *);
+static int same_dw_val_p (const dw_val_node *, const dw_val_node *, int *);
 static int same_attr_p (dw_attr_ref, dw_attr_ref, int *);
 static int same_die_p (dw_die_ref, dw_die_ref, int *);
 static int same_die_p_wrap (dw_die_ref, dw_die_ref);
@@ -4191,18 +4191,18 @@ static void output_pubnames (VEC (pubnam
 static void add_arange (tree, dw_die_ref);
 static void output_aranges (void);
 static unsigned int add_ranges_num (int);
-static unsigned int add_ranges (tree);
+static unsigned int add_ranges (const_tree);
 static unsigned int add_ranges_by_labels (const char *, const char *);
 static void output_ranges (void);
 static void output_line_info (void);
 static void output_file_names (void);
 static dw_die_ref base_type_die (tree);
 static int is_base_type (tree);
-static bool is_subrange_type (tree);
+static bool is_subrange_type (const_tree);
 static dw_die_ref subrange_type_die (tree, dw_die_ref);
 static dw_die_ref modified_type_die (tree, int, int, dw_die_ref);
-static int type_is_enum (tree);
-static unsigned int dbx_reg_number (rtx);
+static int type_is_enum (const_tree);
+static unsigned int dbx_reg_number (const_rtx);
 static void add_loc_descr_op_piece (dw_loc_descr_ref *, int);
 static dw_loc_descr_ref reg_loc_descriptor (rtx, enum var_init_status);
 static dw_loc_descr_ref one_reg_loc_descriptor (unsigned int,
@@ -4212,7 +4212,7 @@ static dw_loc_descr_ref multiple_reg_loc
 static dw_loc_descr_ref int_loc_descriptor (HOST_WIDE_INT);
 static dw_loc_descr_ref based_loc_descr (rtx, HOST_WIDE_INT,
 					 enum var_init_status);
-static int is_based_loc (rtx);
+static int is_based_loc (const_rtx);
 static dw_loc_descr_ref mem_loc_descriptor (rtx, enum machine_mode mode,
 					    enum var_init_status);
 static dw_loc_descr_ref concat_loc_descriptor (rtx, rtx,
@@ -4221,18 +4221,18 @@ static dw_loc_descr_ref loc_descriptor (
 static dw_loc_descr_ref loc_descriptor_from_tree_1 (tree, int);
 static dw_loc_descr_ref loc_descriptor_from_tree (tree);
 static HOST_WIDE_INT ceiling (HOST_WIDE_INT, unsigned int);
-static tree field_type (tree);
-static unsigned int simple_type_align_in_bits (tree);
-static unsigned int simple_decl_align_in_bits (tree);
-static unsigned HOST_WIDE_INT simple_type_size_in_bits (tree);
-static HOST_WIDE_INT field_byte_offset (tree);
+static tree field_type (const_tree);
+static unsigned int simple_type_align_in_bits (const_tree);
+static unsigned int simple_decl_align_in_bits (const_tree);
+static unsigned HOST_WIDE_INT simple_type_size_in_bits (const_tree);
+static HOST_WIDE_INT field_byte_offset (const_tree);
 static void add_AT_location_description	(dw_die_ref, enum dwarf_attribute,
 					 dw_loc_descr_ref);
 static void add_data_member_location_attribute (dw_die_ref, tree);
 static void add_const_value_attribute (dw_die_ref, rtx);
 static void insert_int (HOST_WIDE_INT, unsigned, unsigned char *);
 static HOST_WIDE_INT extract_int (const unsigned char *, unsigned);
-static void insert_float (rtx, unsigned char *);
+static void insert_float (const_rtx, unsigned char *);
 static rtx rtl_for_decl_location (tree);
 static void add_location_or_const_value_attribute (dw_die_ref, tree,
 						   enum dwarf_attribute);
@@ -4256,8 +4256,8 @@ static inline int local_scope_p (dw_die_
 static inline int class_or_namespace_scope_p (dw_die_ref);
 static void add_type_attribute (dw_die_ref, tree, int, int, dw_die_ref);
 static void add_calling_convention_attribute (dw_die_ref, tree);
-static const char *type_tag (tree);
-static tree member_declared_type (tree);
+static const char *type_tag (const_tree);
+static tree member_declared_type (const_tree);
 #if 0
 static const char *decl_start_label (tree);
 #endif
@@ -4290,7 +4290,7 @@ static void gen_type_die (tree, dw_die_r
 static void gen_tagged_type_instantiation_die (tree, dw_die_ref);
 static void gen_block_die (tree, dw_die_ref, int);
 static void decls_for_scope (tree, dw_die_ref, int);
-static int is_redundant_typedef (tree);
+static int is_redundant_typedef (const_tree);
 static void gen_namespace_die (tree);
 static void gen_decl_die (tree, dw_die_ref);
 static dw_die_ref force_decl_die (tree);
@@ -4437,7 +4437,7 @@ dwarf2out_set_demangle_name_func (const
 /* Test if rtl node points to a pseudo register.  */

 static inline int
-is_pseudo_reg (rtx rtl)
+is_pseudo_reg (const_rtx rtl)
 {
   return ((REG_P (rtl) && REGNO (rtl) >= FIRST_PSEUDO_REGISTER)
 	  || (GET_CODE (rtl) == SUBREG
@@ -4467,7 +4467,7 @@ type_main_variant (tree type)
 /* Return nonzero if the given type node represents a tagged type.  */

 static inline int
-is_tagged_type (tree type)
+is_tagged_type (const_tree type)
 {
   enum tree_code code = TREE_CODE (type);

@@ -4863,7 +4863,7 @@ dwarf_form_name (unsigned int form)
    given block.  */

 static tree
-decl_ultimate_origin (tree decl)
+decl_ultimate_origin (const_tree decl)
 {
   if (!CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_COMMON))
     return NULL_TREE;
@@ -4888,7 +4888,7 @@ decl_ultimate_origin (tree decl)
    given block.  */

 static tree
-block_ultimate_origin (tree block)
+block_ultimate_origin (const_tree block)
 {
   tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);

@@ -5734,7 +5734,7 @@ decl_loc_table_eq (const void *x, const
 /* Return the var_loc list associated with a given declaration.  */

 static inline var_loc_list *
-lookup_decl_loc (tree decl)
+lookup_decl_loc (const_tree decl)
 {
   return htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
 }
@@ -6099,7 +6099,7 @@ same_loc_p (dw_loc_descr_ref loc1, dw_lo

 /* Do the values look the same?  */
 static int
-same_dw_val_p (dw_val_node *v1, dw_val_node *v2, int *mark)
+same_dw_val_p (const dw_val_node *v1, const dw_val_node *v2, int *mark)
 {
   dw_loc_descr_ref loc1, loc2;
   rtx r1, r2;
@@ -7667,7 +7667,7 @@ add_ranges_num (int num)
    range terminator if BLOCK is NULL.  */

 static unsigned int
-add_ranges (tree block)
+add_ranges (const_tree block)
 {
   return add_ranges_num (block ? BLOCK_NUMBER (block) : 0);
 }
@@ -8515,7 +8515,7 @@ is_base_type (tree type)
    ERROR_MARK node.  */

 static inline unsigned HOST_WIDE_INT
-simple_type_size_in_bits (tree type)
+simple_type_size_in_bits (const_tree type)
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return BITS_PER_WORD;
@@ -8531,7 +8531,7 @@ simple_type_size_in_bits (tree type)
    emitted as a subrange type.  */

 static inline bool
-is_subrange_type (tree type)
+is_subrange_type (const_tree type)
 {
   tree subtype = TREE_TYPE (type);

@@ -8757,7 +8757,7 @@ modified_type_die (tree type, int is_con
    an enumerated type.  */

 static inline int
-type_is_enum (tree type)
+type_is_enum (const_tree type)
 {
   return TREE_CODE (type) == ENUMERAL_TYPE;
 }
@@ -8765,7 +8765,7 @@ type_is_enum (tree type)
 /* Return the DBX register number described by a given RTL node.  */

 static unsigned int
-dbx_reg_number (rtx rtl)
+dbx_reg_number (const_rtx rtl)
 {
   unsigned regno = REGNO (rtl);

@@ -8991,7 +8991,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT
 /* Return true if this RTL expression describes a base+offset calculation.  */

 static inline int
-is_based_loc (rtx rtl)
+is_based_loc (const_rtx rtl)
 {
   return (GET_CODE (rtl) == PLUS
 	  && ((REG_P (XEXP (rtl, 0))
@@ -9840,7 +9840,7 @@ ceiling (HOST_WIDE_INT value, unsigned i
    ERROR_MARK node.  */

 static inline tree
-field_type (tree decl)
+field_type (const_tree decl)
 {
   tree type;

@@ -9859,13 +9859,13 @@ field_type (tree decl)
    be an ERROR_MARK node.  */

 static inline unsigned
-simple_type_align_in_bits (tree type)
+simple_type_align_in_bits (const_tree type)
 {
   return (TREE_CODE (type) != ERROR_MARK) ? TYPE_ALIGN (type) : BITS_PER_WORD;
 }

 static inline unsigned
-simple_decl_align_in_bits (tree decl)
+simple_decl_align_in_bits (const_tree decl)
 {
   return (TREE_CODE (decl) != ERROR_MARK) ? DECL_ALIGN (decl) : BITS_PER_WORD;
 }
@@ -9896,7 +9896,7 @@ round_up_to_align (HOST_WIDE_INT t, unsi
    just yet).  */

 static HOST_WIDE_INT
-field_byte_offset (tree decl)
+field_byte_offset (const_tree decl)
 {
   HOST_WIDE_INT object_offset_in_bits;
   HOST_WIDE_INT bitpos_int;
@@ -10162,7 +10162,7 @@ extract_int (const unsigned char *src, u
 /* Writes floating point values to dw_vec_const array.  */

 static void
-insert_float (rtx rtl, unsigned char *array)
+insert_float (const_rtx rtl, unsigned char *array)
 {
   REAL_VALUE_TYPE rv;
   long val[4];
@@ -10622,7 +10622,7 @@ rtl_for_decl_location (tree decl)
    XXX: If you split a variable across multiple sections, we won't notice.  */

 static const char *
-secname_for_decl (tree decl)
+secname_for_decl (const_tree decl)
 {
   const char *secname;

@@ -11488,7 +11488,7 @@ add_calling_convention_attribute (dw_die
    was declared without a tag.  */

 static const char *
-type_tag (tree type)
+type_tag (const_tree type)
 {
   const char *name = 0;

@@ -11526,7 +11526,7 @@ type_tag (tree type)
    for bit field types.  */

 static inline tree
-member_declared_type (tree member)
+member_declared_type (const_tree member)
 {
   return (DECL_BIT_FIELD_TYPE (member)
 	  ? DECL_BIT_FIELD_TYPE (member) : TREE_TYPE (member));
@@ -12484,7 +12484,7 @@ add_call_src_coords_attributes (tree stm
    first subblock's abstract origin is the function's outermost block,
    then we're looking at the main entry point.  */
 static bool
-is_inlined_entry_point (tree stmt)
+is_inlined_entry_point (const_tree stmt)
 {
   tree decl, block;

@@ -13339,7 +13339,7 @@ decls_for_scope (tree stmt, dw_die_ref c
 /* Is this a typedef we can avoid emitting?  */

 static inline int
-is_redundant_typedef (tree decl)
+is_redundant_typedef (const_tree decl)
 {
   if (TYPE_DECL_IS_STUB (decl))
     return 1;
@@ -13950,7 +13950,7 @@ dwarf2out_end_block (unsigned int line A
    we may end up calling them anyway.  */

 static bool
-dwarf2out_ignore_block (tree block)
+dwarf2out_ignore_block (const_tree block)
 {
   tree decl;

diff -rup orig/egcc-SVN20070825/gcc/emit-rtl.c egcc-SVN20070825/gcc/emit-rtl.c
--- orig/egcc-SVN20070825/gcc/emit-rtl.c	2007-08-24 15:16:12.000000000 -0400
+++ egcc-SVN20070825/gcc/emit-rtl.c	2007-08-25 15:06:33.285603616 -0400
@@ -2865,103 +2865,169 @@ get_max_uid (void)
 /* Return the next insn.  If it is a SEQUENCE, return the first insn
    of the sequence.  */

+#define NEXT_INSN_BODY do { \
+  if (insn) \
+    { \
+      insn = NEXT_INSN (insn); \
+      if (insn && NONJUMP_INSN_P (insn) \
+	  && GET_CODE (PATTERN (insn)) == SEQUENCE) \
+	insn = XVECEXP (PATTERN (insn), 0, 0); \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 next_insn (rtx insn)
 {
-  if (insn)
-    {
-      insn = NEXT_INSN (insn);
-      if (insn && NONJUMP_INSN_P (insn)
-	  && GET_CODE (PATTERN (insn)) == SEQUENCE)
-	insn = XVECEXP (PATTERN (insn), 0, 0);
-    }
+  NEXT_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_next_insn (const_rtx insn)
+{
+  NEXT_INSN_BODY;
 }

+#undef NEXT_INSN_BODY
+
 /* Return the previous insn.  If it is a SEQUENCE, return the last insn
    of the sequence.  */

+#define PREVIOUS_INSN_BODY do { \
+  if (insn) \
+    { \
+      insn = PREV_INSN (insn); \
+      if (insn && NONJUMP_INSN_P (insn) \
+	  && GET_CODE (PATTERN (insn)) == SEQUENCE) \
+	insn = XVECEXP (PATTERN (insn), 0, XVECLEN (PATTERN (insn), 0) - 1); \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 previous_insn (rtx insn)
 {
-  if (insn)
-    {
-      insn = PREV_INSN (insn);
-      if (insn && NONJUMP_INSN_P (insn)
-	  && GET_CODE (PATTERN (insn)) == SEQUENCE)
-	insn = XVECEXP (PATTERN (insn), 0, XVECLEN (PATTERN (insn), 0) - 1);
-    }
+  PREVIOUS_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_previous_insn (const_rtx insn)
+{
+  PREVIOUS_INSN_BODY;
 }

+#undef PREVIOUS_INSN_BODY
+
 /* Return the next insn after INSN that is not a NOTE.  This routine does not
    look inside SEQUENCEs.  */

+#define NEXT_NONNOTE_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = NEXT_INSN (insn); \
+      if (insn == 0 || !NOTE_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 next_nonnote_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = NEXT_INSN (insn);
-      if (insn == 0 || !NOTE_P (insn))
-	break;
-    }
+  NEXT_NONNOTE_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_next_nonnote_insn (const_rtx insn)
+{
+  NEXT_NONNOTE_INSN_BODY;
 }

+#undef NEXT_NONNOTE_INSN_BODY
+
 /* Return the previous insn before INSN that is not a NOTE.  This routine does
    not look inside SEQUENCEs.  */

+#define PREV_NONNOTE_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = PREV_INSN (insn); \
+      if (insn == 0 || !NOTE_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 prev_nonnote_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = PREV_INSN (insn);
-      if (insn == 0 || !NOTE_P (insn))
-	break;
-    }
+  PREV_NONNOTE_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_prev_nonnote_insn (const_rtx insn)
+{
+  PREV_NONNOTE_INSN_BODY;
 }

+#undef PREV_NONNOTE_INSN_BODY
+
 /* Return the next INSN, CALL_INSN or JUMP_INSN after INSN;
    or 0, if there is none.  This routine does not look inside
    SEQUENCEs.  */

+#define NEXT_REAL_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = NEXT_INSN (insn); \
+      if (insn == 0 || INSN_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 next_real_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = NEXT_INSN (insn);
-      if (insn == 0 || INSN_P (insn))
-	break;
-    }
+  NEXT_REAL_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_next_real_insn (const_rtx insn)
+{
+  NEXT_REAL_INSN_BODY;
 }

+#undef NEXT_REAL_INSN_BODY
+
 /* Return the last INSN, CALL_INSN or JUMP_INSN before INSN;
    or 0, if there is none.  This routine does not look inside
    SEQUENCEs.  */

+#define PREV_REAL_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = PREV_INSN (insn); \
+      if (insn == 0 || INSN_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 prev_real_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = PREV_INSN (insn);
-      if (insn == 0 || INSN_P (insn))
-	break;
-    }
+  PREV_REAL_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_prev_real_insn (const_rtx insn)
+{
+  PREV_REAL_INSN_BODY;
 }

+#undef PREV_REAL_INSN_BODY
+
 /* Return the last CALL_INSN in the current list, or 0 if there is none.
    This routine does not look inside SEQUENCEs.  */

@@ -2992,66 +3058,110 @@ active_insn_p (const_rtx insn)
 		      && GET_CODE (PATTERN (insn)) != CLOBBER))));
 }

+#define NEXT_ACTIVE_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = NEXT_INSN (insn); \
+      if (insn == 0 || active_insn_p (insn)) \
+	break; \
+    } \
+  return insn;\
+} while (0)
+
 rtx
 next_active_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = NEXT_INSN (insn);
-      if (insn == 0 || active_insn_p (insn))
-	break;
-    }
+  NEXT_ACTIVE_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_next_active_insn (const_rtx insn)
+{
+  NEXT_ACTIVE_INSN_BODY;
 }

+#undef NEXT_ACTIVE_INSN_BODY
+
 /* Find the last insn before INSN that really does something.  This routine
    does not look inside SEQUENCEs.  Until reload has completed, this is the
    same as prev_real_insn.  */

+#define PREV_ACTIVE_INSN_BODY do { \
+  while (insn) \
+    { \
+      insn = PREV_INSN (insn);\
+      if (insn == 0 || active_insn_p (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 prev_active_insn (rtx insn)
 {
-  while (insn)
-    {
-      insn = PREV_INSN (insn);
-      if (insn == 0 || active_insn_p (insn))
-	break;
-    }
+  PREV_ACTIVE_INSN_BODY;
+}

-  return insn;
+const_rtx
+const_prev_active_insn (const_rtx insn)
+{
+  PREV_ACTIVE_INSN_BODY;
 }

+#undef PREV_ACTIVE_INSN_BODY
+
 /* Return the next CODE_LABEL after the insn INSN, or 0 if there is none.  */

+#define NEXT_LABEL_BODY do { \
+  while (insn) \
+    { \
+      insn = NEXT_INSN (insn); \
+      if (insn == 0 || LABEL_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 next_label (rtx insn)
 {
-  while (insn)
-    {
-      insn = NEXT_INSN (insn);
-      if (insn == 0 || LABEL_P (insn))
-	break;
-    }
+  NEXT_LABEL_BODY;
+}

-  return insn;
+const_rtx
+const_next_label (const_rtx insn)
+{
+  NEXT_LABEL_BODY;
 }

+#undef NEXT_LABEL_BODY
+
 /* Return the last CODE_LABEL before the insn INSN, or 0 if there is none.  */

+#define PREV_LABEL_BODY do { \
+  while (insn) \
+    { \
+      insn = PREV_INSN (insn); \
+      if (insn == 0 || LABEL_P (insn)) \
+	break; \
+    } \
+  return insn; \
+} while (0)
+
 rtx
 prev_label (rtx insn)
 {
-  while (insn)
-    {
-      insn = PREV_INSN (insn);
-      if (insn == 0 || LABEL_P (insn))
-	break;
-    }
+  PREV_LABEL_BODY;
+}

-  return insn;
+const_rtx
+const_prev_label (const_rtx insn)
+{
+  PREV_LABEL_BODY;
 }

+#undef PREV_LABEL_BODY
+
 /* Return the last label to mark the same position as LABEL.  Return null
    if LABEL itself is null.  */

diff -rup orig/egcc-SVN20070825/gcc/except.h egcc-SVN20070825/gcc/except.h
--- orig/egcc-SVN20070825/gcc/except.h	2007-08-14 01:01:48.000000000 -0400
+++ egcc-SVN20070825/gcc/except.h	2007-08-25 13:21:21.469182816 -0400
@@ -112,8 +112,8 @@ extern int eh_region_outermost (struct f
 /* tree-eh.c */
 extern void add_stmt_to_eh_region_fn (struct function *, tree, int);
 extern bool remove_stmt_from_eh_region_fn (struct function *, tree);
-extern int lookup_stmt_eh_region_fn (struct function *, tree);
-extern int lookup_stmt_eh_region (tree);
+extern int lookup_stmt_eh_region_fn (struct function *, const_tree);
+extern int lookup_stmt_eh_region (const_tree);
 extern bool verify_eh_edges (tree);

 /* If non-NULL, this is a function that returns an expression to be
diff -rup orig/egcc-SVN20070825/gcc/haifa-sched.c egcc-SVN20070825/gcc/haifa-sched.c
--- orig/egcc-SVN20070825/gcc/haifa-sched.c	2007-08-22 20:03:47.000000000 -0400
+++ egcc-SVN20070825/gcc/haifa-sched.c	2007-08-25 16:57:09.105661898 -0400
@@ -328,7 +328,7 @@ static int clock_var;
 /* Number of instructions in current scheduling region.  */
 static int rgn_n_insns;

-static int may_trap_exp (rtx, int);
+static int may_trap_exp (const_rtx, int);

 /* Nonzero iff the address is comprised from at most 1 register.  */
 #define CONST_BASED_ADDRESS_P(x)			\
@@ -342,7 +342,7 @@ static int may_trap_exp (rtx, int);
    as found by analyzing insn's expression.  */

 static int
-may_trap_exp (rtx x, int is_store)
+may_trap_exp (const_rtx x, int is_store)
 {
   enum rtx_code code;

@@ -415,7 +415,7 @@ may_trap_exp (rtx x, int is_store)
    being either PFREE or PRISKY.  */

 int
-haifa_classify_insn (rtx insn)
+haifa_classify_insn (const_rtx insn)
 {
   rtx pat = PATTERN (insn);
   int tmp_class = TRAP_FREE;
@@ -499,7 +499,7 @@ static int rank_for_schedule (const void
 static void swap_sort (rtx *, int);
 static void queue_insn (rtx, int);
 static int schedule_insn (rtx);
-static int find_set_reg_weight (rtx);
+static int find_set_reg_weight (const_rtx);
 static void find_insn_reg_weight (basic_block);
 static void find_insn_reg_weight1 (rtx);
 static void adjust_priority (rtx);
@@ -1358,7 +1358,7 @@ get_ebb_head_tail (basic_block beg, basi
 /* Return nonzero if there are no real insns in the range [ HEAD, TAIL ].  */

 int
-no_real_insns_p (rtx head, rtx tail)
+no_real_insns_p (const_rtx head, const_rtx tail)
 {
   while (head != NEXT_INSN (tail))
     {
@@ -1408,7 +1408,7 @@ rm_other_notes (rtx head, rtx tail)
    a new register is not needed.  */

 static int
-find_set_reg_weight (rtx x)
+find_set_reg_weight (const_rtx x)
 {
   if (GET_CODE (x) == CLOBBER
       && register_operand (SET_DEST (x), VOIDmode))
@@ -4017,7 +4017,7 @@ change_pattern (rtx insn, rtx new_pat)

 /* Return true if INSN can potentially be speculated with type DS.  */
 bool
-sched_insn_is_legitimate_for_speculation_p (rtx insn, ds_t ds)
+sched_insn_is_legitimate_for_speculation_p (const_rtx insn, ds_t ds)
 {
   if (HAS_INTERNAL_DEP (insn))
     return false;
diff -rup orig/egcc-SVN20070825/gcc/jump.c egcc-SVN20070825/gcc/jump.c
--- orig/egcc-SVN20070825/gcc/jump.c	2007-08-24 15:16:09.000000000 -0400
+++ egcc-SVN20070825/gcc/jump.c	2007-08-25 16:17:30.404520684 -0400
@@ -233,7 +233,8 @@ mark_all_labels (rtx f)
    description should define REVERSIBLE_CC_MODE and REVERSE_CONDITION macros
    to help this function avoid overhead in these cases.  */
 enum rtx_code
-reversed_comparison_code_parts (enum rtx_code code, rtx arg0, rtx arg1, rtx insn)
+reversed_comparison_code_parts (enum rtx_code code, const_rtx arg0,
+				const_rtx arg1, const_rtx insn)
 {
   enum machine_mode mode;

@@ -290,7 +291,7 @@ reversed_comparison_code_parts (enum rtx

   if (GET_MODE_CLASS (mode) == MODE_CC || CC0_P (arg0))
     {
-      rtx prev;
+      const_rtx prev;
       /* Try to search for the comparison to determine the real mode.
          This code is expensive, but with sane machine description it
          will be never used, since REVERSIBLE_CC_MODE will return true
@@ -298,9 +299,9 @@ reversed_comparison_code_parts (enum rtx
       if (! insn)
 	return UNKNOWN;

-      for (prev = prev_nonnote_insn (insn);
+      for (prev = const_prev_nonnote_insn (insn);
 	   prev != 0 && !LABEL_P (prev);
-	   prev = prev_nonnote_insn (prev))
+	   prev = const_prev_nonnote_insn (prev))
 	{
 	  const_rtx set = set_of (arg0, prev);
 	  if (set && GET_CODE (set) == SET
@@ -346,7 +347,7 @@ reversed_comparison_code_parts (enum rtx
 /* A wrapper around the previous function to take COMPARISON as rtx
    expression.  This simplifies many callers.  */
 enum rtx_code
-reversed_comparison_code (rtx comparison, rtx insn)
+reversed_comparison_code (const_rtx comparison, const_rtx insn)
 {
   if (!COMPARISON_P (comparison))
     return UNKNOWN;
@@ -358,7 +359,7 @@ reversed_comparison_code (rtx comparison
 /* Return comparison with reversed code of EXP.
    Return NULL_RTX in case we fail to do the reversal.  */
 rtx
-reversed_comparison (rtx exp, enum machine_mode mode)
+reversed_comparison (const_rtx exp, enum machine_mode mode)
 {
   enum rtx_code reversed_code = reversed_comparison_code (exp, NULL_RTX);
   if (reversed_code == UNKNOWN)
@@ -789,7 +790,7 @@ any_condjump_p (const_rtx insn)
 /* Return the label of a conditional jump.  */

 rtx
-condjump_label (rtx insn)
+condjump_label (const_rtx insn)
 {
   rtx x = pc_set (insn);

diff -rup orig/egcc-SVN20070825/gcc/predict.c egcc-SVN20070825/gcc/predict.c
--- orig/egcc-SVN20070825/gcc/predict.c	2007-08-16 10:44:46.000000000 -0400
+++ egcc-SVN20070825/gcc/predict.c	2007-08-25 13:28:56.574212187 -0400
@@ -162,7 +162,7 @@ probably_never_executed_bb_p (const_basi
    PREDICTOR.  */

 bool
-rtl_predicted_by_p (basic_block bb, enum br_predictor predictor)
+rtl_predicted_by_p (const_basic_block bb, enum br_predictor predictor)
 {
   rtx note;
   if (!INSN_P (BB_END (bb)))
@@ -183,7 +183,7 @@ static struct pointer_map_t *bb_predicti
    PREDICTOR.  */

 bool
-tree_predicted_by_p (basic_block bb, enum br_predictor predictor)
+tree_predicted_by_p (const_basic_block bb, enum br_predictor predictor)
 {
   struct edge_prediction *i;
   void **preds = pointer_map_contains (bb_predictions, bb);
diff -rup orig/egcc-SVN20070825/gcc/reg-stack.c egcc-SVN20070825/gcc/reg-stack.c
--- orig/egcc-SVN20070825/gcc/reg-stack.c	2007-07-28 23:02:58.000000000 -0400
+++ egcc-SVN20070825/gcc/reg-stack.c	2007-08-25 15:18:59.375811715 -0400
@@ -249,7 +249,7 @@ static rtx not_a_num;

 /* Forward declarations */

-static int stack_regs_mentioned_p (rtx pat);
+static int stack_regs_mentioned_p (const_rtx pat);
 static void pop_stack (stack, int);
 static rtx *get_true_reg (rtx *);

@@ -276,7 +276,7 @@ static rtx next_flags_user (rtx);
 /* Return nonzero if any stack register is mentioned somewhere within PAT.  */

 static int
-stack_regs_mentioned_p (rtx pat)
+stack_regs_mentioned_p (const_rtx pat)
 {
   const char *fmt;
   int i;
@@ -305,7 +305,7 @@ stack_regs_mentioned_p (rtx pat)
 /* Return nonzero if INSN mentions stacked registers, else return zero.  */

 int
-stack_regs_mentioned (rtx insn)
+stack_regs_mentioned (const_rtx insn)
 {
   unsigned int uid, max;
   int test;
diff -rup orig/egcc-SVN20070825/gcc/rtl.h egcc-SVN20070825/gcc/rtl.h
--- orig/egcc-SVN20070825/gcc/rtl.h	2007-08-25 11:25:45.000000000 -0400
+++ egcc-SVN20070825/gcc/rtl.h	2007-08-25 16:17:38.974847658 -0400
@@ -1593,16 +1593,26 @@ extern rtx make_jump_insn_raw (rtx);
 extern void add_function_usage_to (rtx, rtx);
 extern rtx last_call_insn (void);
 extern rtx previous_insn (rtx);
+extern const_rtx const_previous_insn (const_rtx);
 extern rtx next_insn (rtx);
+extern const_rtx const_next_insn (const_rtx);
 extern rtx prev_nonnote_insn (rtx);
+extern const_rtx const_prev_nonnote_insn (const_rtx);
 extern rtx next_nonnote_insn (rtx);
+extern const_rtx const_next_nonnote_insn (const_rtx);
 extern rtx prev_real_insn (rtx);
+extern const_rtx const_prev_real_insn (const_rtx);
 extern rtx next_real_insn (rtx);
+extern const_rtx const_next_real_insn (const_rtx);
 extern rtx prev_active_insn (rtx);
+extern const_rtx const_prev_active_insn (const_rtx);
 extern rtx next_active_insn (rtx);
+extern const_rtx const_next_active_insn (const_rtx);
 extern int active_insn_p (const_rtx);
 extern rtx prev_label (rtx);
+extern const_rtx const_prev_label (const_rtx);
 extern rtx next_label (rtx);
+extern const_rtx const_next_label (const_rtx);
 extern rtx skip_consecutive_labels (rtx);
 extern rtx next_cc0_user (rtx);
 extern rtx prev_cc0_setter (rtx);
@@ -1708,9 +1718,9 @@ extern int reg_used_between_p (const_rtx
 extern int reg_set_between_p (const_rtx, const_rtx, const_rtx);
 extern int commutative_operand_precedence (rtx);
 extern bool swap_commutative_operands_p (rtx, rtx);
-extern int modified_between_p (rtx, rtx, rtx);
+extern int modified_between_p (const_rtx, const_rtx, const_rtx);
 extern int no_labels_between_p (const_rtx, const_rtx);
-extern int modified_in_p (rtx, rtx);
+extern int modified_in_p (const_rtx, const_rtx);
 extern int reg_set_p (const_rtx, const_rtx);
 extern rtx single_set_2 (const_rtx, const_rtx);
 extern int multiple_sets (const_rtx);
@@ -1721,6 +1731,7 @@ extern int refers_to_regno_p (unsigned i
 extern int reg_overlap_mentioned_p (const_rtx, const_rtx);
 extern const_rtx set_of (const_rtx, const_rtx);
 extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *);
+extern void const_note_stores (const_rtx, void (*) (const_rtx, const_rtx, const void *), const void *);
 extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
 extern int dead_or_set_p (const_rtx, const_rtx);
 extern int dead_or_set_regno_p (const_rtx, unsigned int);
@@ -1753,7 +1764,7 @@ extern int in_expr_list_p (const_rtx, co
 extern void remove_node_from_expr_list (const_rtx, rtx *);
 extern int loc_mentioned_in_p (rtx *, const_rtx);
 extern rtx find_first_parameter_load (rtx, rtx);
-extern bool keep_with_call_p (rtx);
+extern bool keep_with_call_p (const_rtx);
 extern bool label_is_jump_target_p (const_rtx, const_rtx);
 extern int insn_rtx_cost (rtx);

@@ -2028,7 +2039,7 @@ extern int condjump_p (const_rtx);
 extern int any_condjump_p (const_rtx);
 extern int any_uncondjump_p (const_rtx);
 extern rtx pc_set (const_rtx);
-extern rtx condjump_label (rtx);
+extern rtx condjump_label (const_rtx);
 extern int simplejump_p (const_rtx);
 extern int returnjump_p (rtx);
 extern int onlyjump_p (const_rtx);
@@ -2043,10 +2054,10 @@ extern int redirect_jump_1 (rtx, rtx);
 extern void redirect_jump_2 (rtx, rtx, rtx, int, int);
 extern int redirect_jump (rtx, rtx, int);
 extern void rebuild_jump_labels (rtx);
-extern rtx reversed_comparison (rtx, enum machine_mode);
-extern enum rtx_code reversed_comparison_code (rtx, rtx);
-extern enum rtx_code reversed_comparison_code_parts (enum rtx_code, rtx,
-						     rtx, rtx);
+extern rtx reversed_comparison (const_rtx, enum machine_mode);
+extern enum rtx_code reversed_comparison_code (const_rtx, const_rtx);
+extern enum rtx_code reversed_comparison_code_parts (enum rtx_code, const_rtx,
+						     const_rtx, const_rtx);
 extern void delete_for_peephole (rtx, rtx);
 extern int condjump_in_parallel_p (const_rtx);

@@ -2246,14 +2257,14 @@ extern int output_dependence (const_rtx,
 extern void init_alias_once (void);
 extern void init_alias_analysis (void);
 extern void end_alias_analysis (void);
-extern bool memory_modified_in_insn_p (rtx, rtx);
+extern bool memory_modified_in_insn_p (const_rtx, const_rtx);
 extern rtx find_base_term (rtx);
 extern rtx gen_hard_reg_clobber (enum machine_mode, unsigned int);
 extern rtx get_reg_known_value (unsigned int);
 extern bool get_reg_known_equiv_p (unsigned int);

 #ifdef STACK_REGS
-extern int stack_regs_mentioned (rtx insn);
+extern int stack_regs_mentioned (const_rtx insn);
 #endif

 /* In toplev.c */
diff -rup orig/egcc-SVN20070825/gcc/rtlanal.c egcc-SVN20070825/gcc/rtlanal.c
--- orig/egcc-SVN20070825/gcc/rtlanal.c	2007-08-23 12:12:22.000000000 -0400
+++ egcc-SVN20070825/gcc/rtlanal.c	2007-08-25 15:54:45.730877994 -0400
@@ -844,9 +844,9 @@ reg_set_p (const_rtx reg, const_rtx insn
    X contains a MEM; this routine does usememory aliasing.  */

 int
-modified_between_p (rtx x, rtx start, rtx end)
+modified_between_p (const_rtx x, const_rtx start, const_rtx end)
 {
-  enum rtx_code code = GET_CODE (x);
+  const enum rtx_code code = GET_CODE (x);
   const char *fmt;
   int i, j;
   rtx insn;
@@ -907,9 +907,9 @@ modified_between_p (rtx x, rtx start, rt
    does use memory aliasing.  */

 int
-modified_in_p (rtx x, rtx insn)
+modified_in_p (const_rtx x, const_rtx insn)
 {
-  enum rtx_code code = GET_CODE (x);
+  const enum rtx_code code = GET_CODE (x);
   const char *fmt;
   int i, j;

@@ -1412,41 +1412,49 @@ reg_overlap_mentioned_p (const_rtx x, co
   If the item being stored in or clobbered is a SUBREG of a hard register,
   the SUBREG will be passed.  */

+#define NOTE_STORES_BODY(NOTE_STORES_FN) do { \
+  int i; \
+  if (GET_CODE (x) == COND_EXEC) \
+    x = COND_EXEC_CODE (x); \
+  if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER) \
+    { \
+      rtx dest = SET_DEST (x); \
+      while ((GET_CODE (dest) == SUBREG \
+	      && (!REG_P (SUBREG_REG (dest)) \
+		  || REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER)) \
+	     || GET_CODE (dest) == ZERO_EXTRACT \
+	     || GET_CODE (dest) == STRICT_LOW_PART) \
+	dest = XEXP (dest, 0); \
+      /* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions, \
+	 each of whose first operand is a register.  */ \
+      if (GET_CODE (dest) == PARALLEL) \
+	{ \
+	  for (i = XVECLEN (dest, 0) - 1; i >= 0; i--) \
+	    if (XEXP (XVECEXP (dest, 0, i), 0) != 0) \
+	      (*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data); \
+	} \
+      else \
+	(*fun) (dest, x, data); \
+    } \
+  else if (GET_CODE (x) == PARALLEL) \
+    for (i = XVECLEN (x, 0) - 1; i >= 0; i--) \
+      NOTE_STORES_FN (XVECEXP (x, 0, i), fun, data); \
+} while (0)
+
 void
 note_stores (const_rtx x, void (*fun) (rtx, const_rtx, void *), void *data)
 {
-  int i;
-
-  if (GET_CODE (x) == COND_EXEC)
-    x = COND_EXEC_CODE (x);
+  NOTE_STORES_BODY(note_stores);
+}

-  if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
-    {
-      rtx dest = SET_DEST (x);
+void
+const_note_stores (const_rtx x, void (*fun) (const_rtx, const_rtx, const void *), const void *data)
+{
+  NOTE_STORES_BODY(const_note_stores);
+}

-      while ((GET_CODE (dest) == SUBREG
-	      && (!REG_P (SUBREG_REG (dest))
-		  || REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER))
-	     || GET_CODE (dest) == ZERO_EXTRACT
-	     || GET_CODE (dest) == STRICT_LOW_PART)
-	dest = XEXP (dest, 0);
-
-      /* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions,
-	 each of whose first operand is a register.  */
-      if (GET_CODE (dest) == PARALLEL)
-	{
-	  for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
-	    if (XEXP (XVECEXP (dest, 0, i), 0) != 0)
-	      (*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data);
-	}
-      else
-	(*fun) (dest, x, data);
-    }
+#undef NOTE_STORES_BODY

-  else if (GET_CODE (x) == PARALLEL)
-    for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
-      note_stores (XVECEXP (x, 0, i), fun, data);
-}

 /* Like notes_stores, but call FUN for each expression that is being
    referenced in PBODY, a pointer to the PATTERN of an insn.  We only call
@@ -3363,7 +3371,7 @@ find_first_parameter_load (rtx call_insn
    call instruction.  */

 bool
-keep_with_call_p (rtx insn)
+keep_with_call_p (const_rtx insn)
 {
   rtx set;

@@ -3384,7 +3392,7 @@ keep_with_call_p (rtx insn)
 	 if we can break or not.  */
       if (SET_DEST (set) == stack_pointer_rtx)
 	{
-	  rtx i2 = next_nonnote_insn (insn);
+	  const_rtx i2 = const_next_nonnote_insn (insn);
 	  if (i2 && keep_with_call_p (i2))
 	    return true;
 	}
diff -rup orig/egcc-SVN20070825/gcc/sched-deps.c egcc-SVN20070825/gcc/sched-deps.c
--- orig/egcc-SVN20070825/gcc/sched-deps.c	2007-08-23 12:12:28.000000000 -0400
+++ egcc-SVN20070825/gcc/sched-deps.c	2007-08-25 16:45:13.267230776 -0400
@@ -418,7 +418,7 @@ static bitmap_head *anti_dependency_cach
 static bitmap_head *spec_dependency_cache;
 static int cache_size;

-static int deps_may_trap_p (rtx);
+static int deps_may_trap_p (const_rtx);
 static void add_dependence_list (rtx, rtx, int, enum reg_note);
 static void add_dependence_list_and_free (rtx, rtx *, int, enum reg_note);
 static void delete_all_dependences (rtx);
@@ -429,8 +429,8 @@ static void sched_analyze_1 (struct deps
 static void sched_analyze_2 (struct deps *, rtx, rtx);
 static void sched_analyze_insn (struct deps *, rtx, rtx);

-static rtx sched_get_condition (rtx);
-static int conditions_mutex_p (rtx, rtx);
+static rtx sched_get_condition (const_rtx);
+static int conditions_mutex_p (const_rtx, const_rtx);

 static enum DEPS_ADJUST_RESULT maybe_add_or_update_dep_1 (dep_t, bool,
 							  rtx, rtx);
@@ -446,13 +446,13 @@ static void check_dep (dep_t, bool);
 /* Return nonzero if a load of the memory reference MEM can cause a trap.  */

 static int
-deps_may_trap_p (rtx mem)
+deps_may_trap_p (const_rtx mem)
 {
-  rtx addr = XEXP (mem, 0);
+  const_rtx addr = XEXP (mem, 0);

   if (REG_P (addr) && REGNO (addr) >= FIRST_PSEUDO_REGISTER)
     {
-      rtx t = get_reg_known_value (REGNO (addr));
+      const_rtx t = get_reg_known_value (REGNO (addr));
       if (t)
 	addr = t;
     }
@@ -462,7 +462,7 @@ deps_may_trap_p (rtx mem)
 /* Find the condition under which INSN is executed.  */

 static rtx
-sched_get_condition (rtx insn)
+sched_get_condition (const_rtx insn)
 {
   rtx pat = PATTERN (insn);
   rtx src;
@@ -498,7 +498,7 @@ sched_get_condition (rtx insn)
 /* Return nonzero if conditions COND1 and COND2 can never be both true.  */

 static int
-conditions_mutex_p (rtx cond1, rtx cond2)
+conditions_mutex_p (const_rtx cond1, const_rtx cond2)
 {
   if (COMPARISON_P (cond1)
       && COMPARISON_P (cond2)
@@ -512,7 +512,7 @@ conditions_mutex_p (rtx cond1, rtx cond2
 /* Return true if insn1 and insn2 can never depend on one another because
    the conditions under which they are executed are mutually exclusive.  */
 bool
-sched_insns_conditions_mutex_p (rtx insn1, rtx insn2)
+sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2)
 {
   rtx cond1, cond2;

@@ -542,7 +542,7 @@ sched_insns_conditions_mutex_p (rtx insn
    This function is used to switch sd_iterator to the next list.
    !!! For internal use only.  Might consider moving it to sched-int.h.  */
 void
-sd_next_list (rtx insn, sd_list_types_def *types_ptr,
+sd_next_list (const_rtx insn, sd_list_types_def *types_ptr,
 	      deps_list_t *list_ptr, bool *resolved_p_ptr)
 {
   sd_list_types_def types = *types_ptr;
@@ -587,7 +587,7 @@ sd_next_list (rtx insn, sd_list_types_de

 /* Return the summary size of INSN's lists defined by LIST_TYPES.  */
 int
-sd_lists_size (rtx insn, sd_list_types_def list_types)
+sd_lists_size (const_rtx insn, sd_list_types_def list_types)
 {
   int size = 0;

@@ -605,7 +605,7 @@ sd_lists_size (rtx insn, sd_list_types_d

 /* Return true if INSN's lists defined by LIST_TYPES are all empty.  */
 bool
-sd_lists_empty_p (rtx insn, sd_list_types_def list_types)
+sd_lists_empty_p (const_rtx insn, sd_list_types_def list_types)
 {
   return sd_lists_size (insn, list_types) == 0;
 }
diff -rup orig/egcc-SVN20070825/gcc/sched-int.h egcc-SVN20070825/gcc/sched-int.h
--- orig/egcc-SVN20070825/gcc/sched-int.h	2007-08-14 11:34:24.000000000 -0400
+++ egcc-SVN20070825/gcc/sched-int.h	2007-08-25 16:57:13.210222154 -0400
@@ -811,7 +811,7 @@ enum INSN_TRAP_CLASS
 extern void print_insn (char *, rtx, int);

 /* Functions in sched-deps.c.  */
-extern bool sched_insns_conditions_mutex_p (rtx, rtx);
+extern bool sched_insns_conditions_mutex_p (const_rtx, const_rtx);
 extern void add_dependence (rtx, rtx, enum reg_note);
 extern void sched_analyze (struct deps *, rtx, rtx);
 extern bool deps_pools_are_empty_p (void);
@@ -829,9 +829,9 @@ extern ds_t ds_merge (ds_t, ds_t);
 extern void debug_ds (ds_t);

 /* Functions in haifa-sched.c.  */
-extern int haifa_classify_insn (rtx);
+extern int haifa_classify_insn (const_rtx);
 extern void get_ebb_head_tail (basic_block, basic_block, rtx *, rtx *);
-extern int no_real_insns_p (rtx, rtx);
+extern int no_real_insns_p (const_rtx, const_rtx);

 extern void rm_other_notes (rtx, rtx);

@@ -845,7 +845,7 @@ extern void sched_finish (void);

 extern int try_ready (rtx);
 extern void * xrecalloc (void *, size_t, size_t, size_t);
-extern bool sched_insn_is_legitimate_for_speculation_p (rtx, ds_t);
+extern bool sched_insn_is_legitimate_for_speculation_p (const_rtx, ds_t);
 extern void unlink_bb_notes (basic_block, basic_block);
 extern void add_block (basic_block, basic_block);
 extern rtx bb_note (basic_block);
@@ -882,7 +882,7 @@ extern void debug_dependencies (rtx, rtx
 /* A type to hold above flags.  */
 typedef int sd_list_types_def;

-extern void sd_next_list (rtx, sd_list_types_def *, deps_list_t *, bool *);
+extern void sd_next_list (const_rtx, sd_list_types_def *, deps_list_t *, bool *);

 /* Iterator to walk through, resolve and delete dependencies.  */
 struct _sd_iterator
@@ -980,8 +980,8 @@ sd_iterator_next (sd_iterator_def *it_pt
        sd_iterator_cond (&(ITER), &(DEP));			\
        sd_iterator_next (&(ITER)))

-extern int sd_lists_size (rtx, sd_list_types_def);
-extern bool sd_lists_empty_p (rtx, sd_list_types_def);
+extern int sd_lists_size (const_rtx, sd_list_types_def);
+extern bool sd_lists_empty_p (const_rtx, sd_list_types_def);
 extern void sd_init_insn (rtx);
 extern void sd_finish_insn (rtx);
 extern dep_t sd_find_dep_between (rtx, rtx, bool);
diff -rup orig/egcc-SVN20070825/gcc/sdbout.c egcc-SVN20070825/gcc/sdbout.c
--- orig/egcc-SVN20070825/gcc/sdbout.c	2007-08-23 12:12:27.000000000 -0400
+++ egcc-SVN20070825/gcc/sdbout.c	2007-08-25 17:30:44.301813037 -0400
@@ -312,7 +312,7 @@ const struct gcc_debug_hooks sdb_debug_h
   sdbout_end_source_file,	         /* end_source_file */
   sdbout_begin_block,		         /* begin_block */
   sdbout_end_block,		         /* end_block */
-  debug_true_tree,		         /* ignore_block */
+  debug_true_const_tree,	         /* ignore_block */
   sdbout_source_line,		         /* source_line */
 #ifdef MIPS_DEBUGGING_INFO
   /* Defer on MIPS systems so that parameter descriptions follow
diff -rup orig/egcc-SVN20070825/gcc/tree-cfg.c egcc-SVN20070825/gcc/tree-cfg.c
--- orig/egcc-SVN20070825/gcc/tree-cfg.c	2007-08-16 10:44:50.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-cfg.c	2007-08-25 13:39:43.417098635 -0400
@@ -104,7 +104,7 @@ static inline void change_bb_for_stmt (t

 /* Flowgraph optimization and cleanup.  */
 static void tree_merge_blocks (basic_block, basic_block);
-static bool tree_can_merge_blocks_p (basic_block, basic_block);
+static bool tree_can_merge_blocks_p (const_basic_block, const_basic_block);
 static void remove_bb (basic_block);
 static edge find_taken_edge_computed_goto (basic_block, tree);
 static edge find_taken_edge_cond_expr (basic_block, tree);
@@ -1135,10 +1135,10 @@ group_case_labels (void)
 /* Checks whether we can merge block B into block A.  */

 static bool
-tree_can_merge_blocks_p (basic_block a, basic_block b)
+tree_can_merge_blocks_p (const_basic_block a, const_basic_block b)
 {
-  tree stmt;
-  block_stmt_iterator bsi;
+  const_tree stmt;
+  const_block_stmt_iterator bsi;
   tree phi;

   if (!single_succ_p (a))
@@ -1158,7 +1158,7 @@ tree_can_merge_blocks_p (basic_block a,

   /* If A ends by a statement causing exceptions or something similar, we
      cannot merge the blocks.  */
-  stmt = last_stmt (a);
+  stmt = const_last_stmt (a);
   if (stmt && stmt_ends_bb_p (stmt))
     return false;

@@ -1184,9 +1184,9 @@ tree_can_merge_blocks_p (basic_block a,
     }

   /* Do not remove user labels.  */
-  for (bsi = bsi_start (b); !bsi_end_p (bsi); bsi_next (&bsi))
+  for (bsi = cbsi_start (b); !cbsi_end_p (bsi); cbsi_next (&bsi))
     {
-      stmt = bsi_stmt (bsi);
+      stmt = cbsi_stmt (bsi);
       if (TREE_CODE (stmt) != LABEL_EXPR)
 	break;
       if (!DECL_ARTIFICIAL (LABEL_EXPR_LABEL (stmt)))
@@ -2451,12 +2451,12 @@ is_ctrl_stmt (const_tree t)
    (e.g., a call to a non-returning function).  */

 bool
-is_ctrl_altering_stmt (tree t)
+is_ctrl_altering_stmt (const_tree t)
 {
-  tree call;
+  const_tree call;

   gcc_assert (t);
-  call = get_call_expr_in (t);
+  call = const_get_call_expr_in (t);
   if (call)
     {
       /* A non-pure/const CALL_EXPR alters flow control if the current
@@ -2558,7 +2558,7 @@ stmt_starts_bb_p (const_tree t, const_tr
 /* Return true if T should end a basic block.  */

 bool
-stmt_ends_bb_p (tree t)
+stmt_ends_bb_p (const_tree t)
 {
   return is_ctrl_stmt (t) || is_ctrl_altering_stmt (t);
 }
@@ -4860,7 +4860,7 @@ tree_redirect_edge_and_branch (edge e, b
    it to the destination of the other edge from E->src.  */

 static bool
-tree_can_remove_branch_p (edge e)
+tree_can_remove_branch_p (const_edge e)
 {
   if (e->flags & EDGE_ABNORMAL)
     return false;
@@ -4956,7 +4956,7 @@ tree_move_block_after (basic_block bb, b
 /* Return true if basic_block can be duplicated.  */

 static bool
-tree_can_duplicate_bb_p (basic_block bb ATTRIBUTE_UNUSED)
+tree_can_duplicate_bb_p (const_basic_block bb ATTRIBUTE_UNUSED)
 {
   return true;
 }
@@ -5917,10 +5917,10 @@ debug_loop_ir (void)
    otherwise.  */

 static bool
-tree_block_ends_with_call_p (basic_block bb)
+tree_block_ends_with_call_p (const_basic_block bb)
 {
-  block_stmt_iterator bsi = bsi_last (bb);
-  return get_call_expr_in (bsi_stmt (bsi)) != NULL;
+  const_block_stmt_iterator bsi = cbsi_last (bb);
+  return const_get_call_expr_in (cbsi_stmt (bsi)) != NULL;
 }


@@ -5928,9 +5928,9 @@ tree_block_ends_with_call_p (basic_block
    otherwise.  */

 static bool
-tree_block_ends_with_condjump_p (basic_block bb)
+tree_block_ends_with_condjump_p (const_basic_block bb)
 {
-  tree stmt = last_stmt (bb);
+  const_tree stmt = const_last_stmt (bb);
   return (stmt && TREE_CODE (stmt) == COND_EXPR);
 }

diff -rup orig/egcc-SVN20070825/gcc/tree-eh.c egcc-SVN20070825/gcc/tree-eh.c
--- orig/egcc-SVN20070825/gcc/tree-eh.c	2007-08-16 20:02:49.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-eh.c	2007-08-25 13:25:11.526092746 -0400
@@ -148,14 +148,16 @@ remove_stmt_from_eh_region (tree t)
 }

 int
-lookup_stmt_eh_region_fn (struct function *ifun, tree t)
+lookup_stmt_eh_region_fn (struct function *ifun, const_tree t)
 {
   struct throw_stmt_node *p, n;

   if (!get_eh_throw_stmt_table (ifun))
     return -2;

-  n.stmt = t;
+  /* The CONST_CAST is okay because we don't modify n.stmt throughout
+     its scope, or the scope of p.  */
+  n.stmt = (tree) CONST_CAST (t);
   p = (struct throw_stmt_node *) htab_find (get_eh_throw_stmt_table (ifun),
                                             &n);

@@ -163,7 +165,7 @@ lookup_stmt_eh_region_fn (struct functio
 }

 int
-lookup_stmt_eh_region (tree t)
+lookup_stmt_eh_region (const_tree t)
 {
   /* We can get called from initialized data when -fnon-call-exceptions
      is on; prevent crash.  */
@@ -2032,7 +2034,7 @@ tree_could_throw_p (tree t)
 }

 bool
-tree_can_throw_internal (tree stmt)
+tree_can_throw_internal (const_tree stmt)
 {
   int region_nr;
   bool is_resx = false;
diff -rup orig/egcc-SVN20070825/gcc/tree-flow-inline.h egcc-SVN20070825/gcc/tree-flow-inline.h
--- orig/egcc-SVN20070825/gcc/tree-flow-inline.h	2007-08-21 20:03:30.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-flow-inline.h	2007-08-25 12:44:44.390501306 -0400
@@ -611,7 +611,7 @@ addresses_taken (tree stmt)
 /* Return the PHI nodes for basic block BB, or NULL if there are no
    PHI nodes.  */
 static inline tree
-phi_nodes (basic_block bb)
+phi_nodes (const_basic_block bb)
 {
   gcc_assert (!(bb->flags & BB_RTL));
   if (!bb->il.tree)
diff -rup orig/egcc-SVN20070825/gcc/tree-flow.h egcc-SVN20070825/gcc/tree-flow.h
--- orig/egcc-SVN20070825/gcc/tree-flow.h	2007-08-25 11:25:46.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-flow.h	2007-08-25 13:19:20.706244730 -0400
@@ -545,7 +545,7 @@ struct edge_prediction GTY((chain_next (
 };

 /* Accessors for basic block annotations.  */
-static inline tree phi_nodes (basic_block);
+static inline tree phi_nodes (const_basic_block);
 static inline void set_phi_nodes (basic_block, tree);

 /*---------------------------------------------------------------------------
@@ -721,9 +721,9 @@ extern void free_omp_regions (void);
 #define PENDING_STMT(e)	((e)->insns.t)

 extern void delete_tree_cfg_annotations (void);
-extern bool stmt_ends_bb_p (tree);
+extern bool stmt_ends_bb_p (const_tree);
 extern bool is_ctrl_stmt (const_tree);
-extern bool is_ctrl_altering_stmt (tree);
+extern bool is_ctrl_altering_stmt (const_tree);
 extern bool computed_goto_p (const_tree);
 extern bool simple_goto_p (const_tree);
 extern bool tree_can_make_abnormal_goto (const_tree);
@@ -1073,9 +1073,9 @@ static inline bool unmodifiable_var_p (c
 extern void make_eh_edges (tree);
 extern bool tree_could_trap_p (tree);
 extern bool tree_could_throw_p (tree);
-extern bool tree_can_throw_internal (tree);
+extern bool tree_can_throw_internal (const_tree);
 extern bool tree_can_throw_external (tree);
-extern int lookup_stmt_eh_region (tree);
+extern int lookup_stmt_eh_region (const_tree);
 extern void add_stmt_to_eh_region (tree, int);
 extern bool remove_stmt_from_eh_region (tree);
 extern bool maybe_clean_or_replace_eh_stmt (tree, tree);
diff -rup orig/egcc-SVN20070825/gcc/tree-gimple.c egcc-SVN20070825/gcc/tree-gimple.c
--- orig/egcc-SVN20070825/gcc/tree-gimple.c	2007-08-14 01:01:46.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-gimple.c	2007-08-25 13:12:45.093649089 -0400
@@ -436,18 +436,28 @@ is_gimple_call_addr (tree t)
 /* If T makes a function call, return the corresponding CALL_EXPR operand.
    Otherwise, return NULL_TREE.  */

+#define GET_CALL_EXPR_IN_BODY do { \
+  /* FIXME tuples: delete the assertion below when conversion complete.  */ \
+  gcc_assert (TREE_CODE (t) != MODIFY_EXPR); \
+  if (TREE_CODE (t) == GIMPLE_MODIFY_STMT) \
+    t = GIMPLE_STMT_OPERAND (t, 1); \
+  if (TREE_CODE (t) == WITH_SIZE_EXPR) \
+    t = TREE_OPERAND (t, 0); \
+  if (TREE_CODE (t) == CALL_EXPR) \
+    return t; \
+  return NULL_TREE; \
+} while (0)
+
 tree
 get_call_expr_in (tree t)
 {
-  /* FIXME tuples: delete the assertion below when conversion complete.  */
-  gcc_assert (TREE_CODE (t) != MODIFY_EXPR);
-  if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
-    t = GIMPLE_STMT_OPERAND (t, 1);
-  if (TREE_CODE (t) == WITH_SIZE_EXPR)
-    t = TREE_OPERAND (t, 0);
-  if (TREE_CODE (t) == CALL_EXPR)
-    return t;
-  return NULL_TREE;
+  GET_CALL_EXPR_IN_BODY;
+}
+
+const_tree
+const_get_call_expr_in (const_tree t)
+{
+  GET_CALL_EXPR_IN_BODY;
 }

 /* Given a memory reference expression T, return its base address.
diff -rup orig/egcc-SVN20070825/gcc/tree-gimple.h egcc-SVN20070825/gcc/tree-gimple.h
--- orig/egcc-SVN20070825/gcc/tree-gimple.h	2007-07-26 23:03:41.000000000 -0400
+++ egcc-SVN20070825/gcc/tree-gimple.h	2007-08-25 13:13:39.697595156 -0400
@@ -90,6 +90,7 @@ extern bool is_gimple_non_addressable (t
 extern bool is_gimple_call_addr (tree);
 /* If T makes a function call, returns the CALL_EXPR operand.  */
 extern tree get_call_expr_in (tree t);
+extern const_tree const_get_call_expr_in (const_tree t);

 extern void recalculate_side_effects (tree);

diff -rup orig/egcc-SVN20070825/gcc/tree.c egcc-SVN20070825/gcc/tree.c
--- orig/egcc-SVN20070825/gcc/tree.c	2007-08-25 11:25:36.000000000 -0400
+++ egcc-SVN20070825/gcc/tree.c	2007-08-25 14:35:33.974292920 -0400
@@ -3811,20 +3811,28 @@ is_attribute_p (const char *attr, const_
    returns the first occurrence; the TREE_CHAIN of the return value should
    be passed back in if further occurrences are wanted.  */

+#define LOOKUP_ATTRIBUTE_BODY(TYPE) do { \
+  TYPE l; \
+  size_t attr_len = strlen (attr_name); \
+  for (l = list; l; l = TREE_CHAIN (l)) \
+    { \
+      gcc_assert (TREE_CODE (TREE_PURPOSE (l)) == IDENTIFIER_NODE); \
+      if (is_attribute_with_length_p (attr_name, attr_len, TREE_PURPOSE (l))) \
+	return l; \
+    } \
+  return NULL_TREE; \
+} while (0)
+
 tree
 lookup_attribute (const char *attr_name, tree list)
 {
-  tree l;
-  size_t attr_len = strlen (attr_name);
-
-  for (l = list; l; l = TREE_CHAIN (l))
-    {
-      gcc_assert (TREE_CODE (TREE_PURPOSE (l)) == IDENTIFIER_NODE);
-      if (is_attribute_with_length_p (attr_name, attr_len, TREE_PURPOSE (l)))
-	return l;
-    }
+  LOOKUP_ATTRIBUTE_BODY(tree);
+}

-  return NULL_TREE;
+const_tree
+const_lookup_attribute (const char *attr_name, const_tree list)
+{
+  LOOKUP_ATTRIBUTE_BODY(const_tree);
 }

 /* Remove any instances of attribute ATTR_NAME in LIST and return the
@@ -4757,7 +4765,7 @@ attribute_hash_list (const_tree list, ha
    equivalent to l1.  */

 int
-attribute_list_equal (tree l1, tree l2)
+attribute_list_equal (const_tree l1, const_tree l2)
 {
   return attribute_list_contained (l1, l2)
 	 && attribute_list_contained (l2, l1);
@@ -4772,9 +4780,9 @@ attribute_list_equal (tree l1, tree l2)
    correctly.  */

 int
-attribute_list_contained (tree l1, tree l2)
+attribute_list_contained (const_tree l1, const_tree l2)
 {
-  tree t1, t2;
+  const_tree t1, t2;

   /* First check the obvious, maybe the lists are identical.  */
   if (l1 == l2)
@@ -4793,11 +4801,11 @@ attribute_list_contained (tree l1, tree

   for (; t2 != 0; t2 = TREE_CHAIN (t2))
     {
-      tree attr;
-      for (attr = lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)), l1);
+      const_tree attr;
+      for (attr = const_lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)), l1);
 	   attr != NULL_TREE;
-	   attr = lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)),
-				    TREE_CHAIN (attr)))
+	   attr = const_lookup_attribute (IDENTIFIER_POINTER (TREE_PURPOSE (t2)),
+					  TREE_CHAIN (attr)))
 	{
 	  if (TREE_VALUE (t2) != NULL
 	      && TREE_CODE (TREE_VALUE (t2)) == TREE_LIST
diff -rup orig/egcc-SVN20070825/gcc/tree.h egcc-SVN20070825/gcc/tree.h
--- orig/egcc-SVN20070825/gcc/tree.h	2007-08-25 11:25:37.000000000 -0400
+++ egcc-SVN20070825/gcc/tree.h	2007-08-25 14:40:20.135554368 -0400
@@ -3998,8 +3998,8 @@ extern bool range_in_array_bounds_p (tre
 extern tree value_member (tree, tree);
 extern tree purpose_member (const_tree, tree);

-extern int attribute_list_equal (tree, tree);
-extern int attribute_list_contained (tree, tree);
+extern int attribute_list_equal (const_tree, const_tree);
+extern int attribute_list_contained (const_tree, const_tree);
 extern int tree_int_cst_equal (const_tree, const_tree);
 extern int tree_int_cst_lt (const_tree, const_tree);
 extern int tree_int_cst_compare (const_tree, const_tree);
@@ -4143,6 +4143,7 @@ extern int is_attribute_p (const char *,
    of the attribute or NULL_TREE if not found.  */

 extern tree lookup_attribute (const char *, tree);
+extern const_tree const_lookup_attribute (const char *, const_tree);

 /* Remove any instances of attribute ATTR_NAME in LIST and return the
    modified list.  */
diff -rup orig/egcc-SVN20070825/gcc/vmsdbgout.c egcc-SVN20070825/gcc/vmsdbgout.c
--- orig/egcc-SVN20070825/gcc/vmsdbgout.c	2007-08-23 12:12:22.000000000 -0400
+++ egcc-SVN20070825/gcc/vmsdbgout.c	2007-08-25 17:31:22.069800120 -0400
@@ -172,7 +172,7 @@ static void vmsdbgout_start_source_file
 static void vmsdbgout_end_source_file (unsigned int);
 static void vmsdbgout_begin_block (unsigned int, unsigned int);
 static void vmsdbgout_end_block (unsigned int, unsigned int);
-static bool vmsdbgout_ignore_block (tree);
+static bool vmsdbgout_ignore_block (const_tree);
 static void vmsdbgout_source_line (unsigned int, const char *);
 static void vmsdbgout_begin_prologue (unsigned int, const char *);
 static void vmsdbgout_end_prologue (unsigned int, const char *);
@@ -1363,7 +1363,7 @@ vmsdbgout_end_block (register unsigned l
 /* Not implemented in VMS Debug.  */

 static bool
-vmsdbgout_ignore_block (tree block)
+vmsdbgout_ignore_block (const_tree block)
 {
   bool retval = 0;

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27  5:22 [PATCH INSTALLED]: const typedefs part 19/N Kaveh R. GHAZI
@ 2007-08-27 14:35 ` Daniel Berlin
  2007-08-27 14:40   ` Daniel Berlin
                     ` (4 more replies)
  0 siblings, 5 replies; 45+ messages in thread
From: Daniel Berlin @ 2007-08-27 14:35 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches

On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> random predicates.
>
> Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
> cross-compile farm to check platforms with other debug-types activating
> different debugging code in the various *out.c files.  I didn't see any
> relevant warnings from building cc1 to those targets.
>
> Installed on mainline.
>
>                 --Kaveh
>
const_last_stmt vs last_stmt?

Please, no.

That crosses the line for me from "i don't care if you want to
constify a bunch of things" to "stop making the code look horrible".
Really, all something like that will do is confuse people.

Honestly, if you want to have const vs non-const return values, for
the same function,  we should simply be using C++.

If we aren't going to do that, please don't add new functions that
simply have const_ prefix'd, as it just makes things ugly for no
discernible gain.

I know most SSA and middle end maintainers  agree here.

I kindly ask you to revert your change to make const_last_stmt and
last_stmt (and others new functions that are prefix'd with const_)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:35 ` Daniel Berlin
@ 2007-08-27 14:40   ` Daniel Berlin
  2007-08-27 14:44   ` Diego Novillo
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 45+ messages in thread
From: Daniel Berlin @ 2007-08-27 14:40 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches

On 8/27/07, Daniel Berlin <dberlin@dberlin.org> wrote:
> On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> > This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> > random predicates.
> >
> > Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
> > cross-compile farm to check platforms with other debug-types activating
> > different debugging code in the various *out.c files.  I didn't see any
> > relevant warnings from building cc1 to those targets.
> >
> > Installed on mainline.
> >
> >                 --Kaveh
> >
> const_last_stmt vs last_stmt?
>
> Please, no.
>
> That crosses the line for me from "i don't care if you want to
> constify a bunch of things" to "stop making the code look horrible".
> Really, all something like that will do is confuse people.
...
> I kindly ask you to revert your change to make const_last_stmt and
> last_stmt (and others new functions that are prefix'd with const_)
>

(to clarify, this also includes bsi_ vs cbsi_*).

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:35 ` Daniel Berlin
  2007-08-27 14:40   ` Daniel Berlin
@ 2007-08-27 14:44   ` Diego Novillo
  2007-08-27 15:02     ` Andrew MacLeod
  2007-08-27 16:25     ` Kaveh R. GHAZI
  2007-08-27 15:00   ` Richard Guenther
                     ` (2 subsequent siblings)
  4 siblings, 2 replies; 45+ messages in thread
From: Diego Novillo @ 2007-08-27 14:44 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Kaveh R. GHAZI, gcc-patches

On 8/27/07, Daniel Berlin <dberlin@dberlin.org> wrote:

> I know most SSA and middle end maintainers  agree here.

Indeed.  I strongly object to all the changes that introduced shadow
'const' names for all the API routines.  This is too much.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:35 ` Daniel Berlin
  2007-08-27 14:40   ` Daniel Berlin
  2007-08-27 14:44   ` Diego Novillo
@ 2007-08-27 15:00   ` Richard Guenther
  2007-08-27 16:08   ` Kaveh R. GHAZI
  2007-08-27 16:37   ` Richard Kenner
  4 siblings, 0 replies; 45+ messages in thread
From: Richard Guenther @ 2007-08-27 15:00 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Kaveh R. GHAZI, gcc-patches

On 8/27/07, Daniel Berlin <dberlin@dberlin.org> wrote:
> On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> > This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> > random predicates.
> >
> > Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
> > cross-compile farm to check platforms with other debug-types activating
> > different debugging code in the various *out.c files.  I didn't see any
> > relevant warnings from building cc1 to those targets.
> >
> > Installed on mainline.
> >
> >                 --Kaveh
> >
> const_last_stmt vs last_stmt?
>
> Please, no.
>
> That crosses the line for me from "i don't care if you want to
> constify a bunch of things" to "stop making the code look horrible".
> Really, all something like that will do is confuse people.
>
> Honestly, if you want to have const vs non-const return values, for
> the same function,  we should simply be using C++.
>
> If we aren't going to do that, please don't add new functions that
> simply have const_ prefix'd, as it just makes things ugly for no
> discernible gain.
>
> I know most SSA and middle end maintainers  agree here.
>
> I kindly ask you to revert your change to make const_last_stmt and
> last_stmt (and others new functions that are prefix'd with const_)

Just to say, indeed, I agree completely.  Please safe us this until we
get real C++.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:44   ` Diego Novillo
@ 2007-08-27 15:02     ` Andrew MacLeod
  2007-08-27 16:25     ` Kaveh R. GHAZI
  1 sibling, 0 replies; 45+ messages in thread
From: Andrew MacLeod @ 2007-08-27 15:02 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Daniel Berlin, Kaveh R. GHAZI, gcc-patches

On Mon, 2007-08-27 at 10:40 -0400, Diego Novillo wrote:
> On 8/27/07, Daniel Berlin <dberlin@dberlin.org> wrote:
> 
> > I know most SSA and middle end maintainers  agree here.
> 
> Indeed.  I strongly object to all the changes that introduced shadow
> 'const' names for all the API routines.  This is too much.

I echo the same sentiments. Too much complexity and name space pollution
for questionable gain. 

Andrew

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:35 ` Daniel Berlin
                     ` (2 preceding siblings ...)
  2007-08-27 15:00   ` Richard Guenther
@ 2007-08-27 16:08   ` Kaveh R. GHAZI
  2007-08-27 16:09     ` Diego Novillo
  2007-08-27 16:22     ` Richard Guenther
  2007-08-27 16:37   ` Richard Kenner
  4 siblings, 2 replies; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-27 16:08 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: gcc-patches

On Mon, 27 Aug 2007, Daniel Berlin wrote:

> On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> > This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> > random predicates.
> >
> > Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
> > cross-compile farm to check platforms with other debug-types activating
> > different debugging code in the various *out.c files.  I didn't see any
> > relevant warnings from building cc1 to those targets.
> >
> > Installed on mainline.
> >
> >                 --Kaveh
> >
> const_last_stmt vs last_stmt?
>
> Please, no.
>
> That crosses the line for me from "i don't care if you want to
> constify a bunch of things" to "stop making the code look horrible".
> Really, all something like that will do is confuse people.
>
> Honestly, if you want to have const vs non-const return values, for
> the same function,  we should simply be using C++.


True, I'm faking in C what comes naturally in C++.

Just curious, how serious are you about using C++ and how much support do
you think there is for that?


> If we aren't going to do that, please don't add new functions that
> simply have const_ prefix'd, as it just makes things ugly for no
> discernible gain.
>
> I know most SSA and middle end maintainers  agree here.
>
> I kindly ask you to revert your change to make const_last_stmt and
> last_stmt (and others new functions that are prefix'd with const_)

Ok, I'll revert the const_last_stmt and related bits.  Thanks for the
feedback.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:08   ` Kaveh R. GHAZI
@ 2007-08-27 16:09     ` Diego Novillo
  2007-08-27 16:22     ` Richard Guenther
  1 sibling, 0 replies; 45+ messages in thread
From: Diego Novillo @ 2007-08-27 16:09 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Daniel Berlin, gcc-patches

On 8/27/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:

> Just curious, how serious are you about using C++ and how much support do
> you think there is for that?

I would be personally delighted if we switched to C++ (with
restrictions), but after that informal poll at the GCC summit, I don't
think it will be easy to do.  More than a few folks didn't care too
much for that.

> Ok, I'll revert the const_last_stmt and related bits.  Thanks for the
> feedback.

Thanks!

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:08   ` Kaveh R. GHAZI
  2007-08-27 16:09     ` Diego Novillo
@ 2007-08-27 16:22     ` Richard Guenther
  2007-08-27 18:50       ` Kaveh R. GHAZI
  2007-08-28 12:45       ` Eric Botcazou
  1 sibling, 2 replies; 45+ messages in thread
From: Richard Guenther @ 2007-08-27 16:22 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Daniel Berlin, gcc-patches

On 8/27/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> On Mon, 27 Aug 2007, Daniel Berlin wrote:
>
> > On 8/26/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> > > This patch constifies cfg_hooks and debug_hooks, plus a bunch of of other
> > > random predicates.
> > >
> > > Bootstrapped on sparc-sun-solaris2.10, no regressions.  I also ran my
> > > cross-compile farm to check platforms with other debug-types activating
> > > different debugging code in the various *out.c files.  I didn't see any
> > > relevant warnings from building cc1 to those targets.
> > >
> > > Installed on mainline.
> > >
> > >                 --Kaveh
> > >
> > const_last_stmt vs last_stmt?
> >
> > Please, no.
> >
> > That crosses the line for me from "i don't care if you want to
> > constify a bunch of things" to "stop making the code look horrible".
> > Really, all something like that will do is confuse people.
> >
> > Honestly, if you want to have const vs non-const return values, for
> > the same function,  we should simply be using C++.
>
>
> True, I'm faking in C what comes naturally in C++.
>
> Just curious, how serious are you about using C++ and how much support do
> you think there is for that?

The strawman poll at the SC panel meeting at the GCC summit revealed
some opposition against using C++.  (I still think the poll result can
interpreted
as strong vote in favor of C++ from the GCC developers ;))

One thing we can do is allow (force?) building stage1 with a C++ host compiler.
Once we got there we have got all bad (forcing a host C++ compiler available)
and no benefit (we don't use any of C++ yet) - so it should be easy to convince
the remaining crowd to just get benefits from this point on :)

The stage1 with C++ intermediate goal has been tried multiple times I think
and patches went in that allowed this to succed (to some point only(?)), but
of course we regress in a second once we don't enforce this.

That said, I vote for forcing stage1 to be build with a C++ compiler for next
stage1.

Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:44   ` Diego Novillo
  2007-08-27 15:02     ` Andrew MacLeod
@ 2007-08-27 16:25     ` Kaveh R. GHAZI
  2007-08-27 16:27       ` Diego Novillo
  2007-08-31 14:03       ` Andrew MacLeod
  1 sibling, 2 replies; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-27 16:25 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Daniel Berlin, gcc-patches

On Mon, 27 Aug 2007, Diego Novillo wrote:

> On 8/27/07, Daniel Berlin <dberlin@dberlin.org> wrote:
>
> > I know most SSA and middle end maintainers  agree here.


Was there some offline conspiracy I wasn't invited to? :-)


> Indeed.  I strongly object to all the changes that introduced shadow
> 'const' names for all the API routines.  This is too much.


You "strongly object"?  I didn't realize it was such a big deal, but ok.

I'll stop adding shadow functions and iterators.  I had more in the
pipeline, so I'm glad you guys spoke up and made your feelings about it
clear.  I'm a bit worried about reverting existing stuff because of
dependencies though.  Let me see what's involved.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:25     ` Kaveh R. GHAZI
@ 2007-08-27 16:27       ` Diego Novillo
  2007-08-31 14:03       ` Andrew MacLeod
  1 sibling, 0 replies; 45+ messages in thread
From: Diego Novillo @ 2007-08-27 16:27 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Daniel Berlin, gcc-patches

On 8/27/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:

> Was there some offline conspiracy I wasn't invited to? :-)

Ha! Nothing of the sort :)  Just idle chatter on the IRC channel.

> You "strongly object"?  I didn't realize it was such a big deal, but ok.

Yes.  I'm sorry I didn't realize sooner.  I have to admit that I was
not paying too much attention to these patches because I had only seen
briefly that it involved changing 'tree' to 'const_tree' which seemed
to me a bit on the ugly side but didn't mind too much.

I stopped paying attention to the discussion and patches until I saw
this morning that it wasn't just the tree->const_tree change.  There
were new shadow functions, which is when I realized the scope of the
changes.

> I'll stop adding shadow functions and iterators.  I had more in the
> pipeline, so I'm glad you guys spoke up and made your feelings about it
> clear.  I'm a bit worried about reverting existing stuff because of
> dependencies though.  Let me see what's involved.

Well, if it means that we have to stop using 'const_tree' in function
arguments, then I would much rather have that than this alternative.
Duplicating code in this manner is just not workable.


Thanks.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 14:35 ` Daniel Berlin
                     ` (3 preceding siblings ...)
  2007-08-27 16:08   ` Kaveh R. GHAZI
@ 2007-08-27 16:37   ` Richard Kenner
  4 siblings, 0 replies; 45+ messages in thread
From: Richard Kenner @ 2007-08-27 16:37 UTC (permalink / raw)
  To: dberlin; +Cc: gcc-patches, ghazi

> That crosses the line for me from "i don't care if you want to
> constify a bunch of things" to "stop making the code look horrible".
> Really, all something like that will do is confuse people.

I agree.  Adding "const" is valuable, but the benefit of doing so is
relatively small and I don't think it should be done if there is any
significant COST in doing so.  Certainly having to add new function is way
too large a cost to justify that, in my mind, and even adding new lines of
code to do ugly conversions would make me wonder if it were worthwhile.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:22     ` Richard Guenther
@ 2007-08-27 18:50       ` Kaveh R. GHAZI
  2007-08-27 23:17         ` Gabriel Dos Reis
  2007-08-28  8:49         ` Richard Guenther
  2007-08-28 12:45       ` Eric Botcazou
  1 sibling, 2 replies; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-27 18:50 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Daniel Berlin, gcc-patches, gdr

On Mon, 27 Aug 2007, Richard Guenther wrote:

> The strawman poll at the SC panel meeting at the GCC summit revealed
> some opposition against using C++.  (I still think the poll result can
> interpreted as strong vote in favor of C++ from the GCC developers ;))

what was the nature of the objections to C++?

Was it worries that less people have C++ compilers to start the bootstrap
process with?  Or was it a language issue, that some people aren't
familiar with C++ and therefore wouldn't be less able to contribute code?

Was there any discussion of performance issues, i.e. will using C++ make
the compiler faster or slower?


> One thing we can do is allow (force?) building stage1 with a C++ host compiler.
> Once we got there we have got all bad (forcing a host C++ compiler available)
> and no benefit (we don't use any of C++ yet) - so it should be easy to convince
> the remaining crowd to just get benefits from this point on :)
>
> The stage1 with C++ intermediate goal has been tried multiple times I think
> and patches went in that allowed this to succed (to some point only(?)), but
> of course we regress in a second once we don't enforce this.
>
> That said, I vote for forcing stage1 to be build with a C++ compiler for next
> stage1.
> Richard.

Saying "forcing stage1 to be build with a C++ compiler" could be
interpreted two ways:

It could mean making it *possible* to build with a C++ compiler, i.e. use
-Wc++-compat for the whole compiler but still allow using plain C to
bootstrap.  (Has anyone tried this recently?  Gaby?)

Or using a more radical interpretation, it could mean *only* allow
building stage1 with C++, i.e. using C++ features in the compiler that
make it impossible to build stage1 with a plain C compiler.

Which did you vote for?

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 18:50       ` Kaveh R. GHAZI
@ 2007-08-27 23:17         ` Gabriel Dos Reis
  2007-08-28 20:31           ` Kaveh R. GHAZI
  2007-08-28  8:49         ` Richard Guenther
  1 sibling, 1 reply; 45+ messages in thread
From: Gabriel Dos Reis @ 2007-08-27 23:17 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Richard Guenther, Daniel Berlin, gcc-patches

"Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:

[...]

| It could mean making it *possible* to build with a C++ compiler, i.e. use
| -Wc++-compat for the whole compiler but still allow using plain C to
| bootstrap.  (Has anyone tried this recently?  Gaby?)

I haven't tried recently, mostly because I have been travelling and
away from my development machine.  I suspect this is probably a good
time to try again.

-- Gaby

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 18:50       ` Kaveh R. GHAZI
  2007-08-27 23:17         ` Gabriel Dos Reis
@ 2007-08-28  8:49         ` Richard Guenther
  2007-08-29  8:35           ` Dirk Mueller
  1 sibling, 1 reply; 45+ messages in thread
From: Richard Guenther @ 2007-08-28  8:49 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Daniel Berlin, gcc-patches, gdr

On 8/27/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> On Mon, 27 Aug 2007, Richard Guenther wrote:
> > That said, I vote for forcing stage1 to be build with a C++ compiler for next
> > stage1.
> > Richard.
>
> Saying "forcing stage1 to be build with a C++ compiler" could be
> interpreted two ways:
>
> It could mean making it *possible* to build with a C++ compiler, i.e. use
> -Wc++-compat for the whole compiler but still allow using plain C to
> bootstrap.  (Has anyone tried this recently?  Gaby?)
>
> Or using a more radical interpretation, it could mean *only* allow
> building stage1 with C++, i.e. using C++ features in the compiler that
> make it impossible to build stage1 with a plain C compiler.
>
> Which did you vote for?

I did vote for requiring a host C++ compiler and build stage1 with it (that is,
libbackend and the C frontend).  stage2/3 would be continued to be built
with a C compiler.  The effect would be that libbackend and the C frontend
would be buildable with both C or C++.  The benefits are 1) we don't regress
in this ability, 2) it's easy to experiment using some C++ features if you
just disable bootstrap.  Especially I would like to have 2) as at the moment
the benefits of using C++ are only theoretical and it is hard to try out some
things as building with C++ breaks all the time.

Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:22     ` Richard Guenther
  2007-08-27 18:50       ` Kaveh R. GHAZI
@ 2007-08-28 12:45       ` Eric Botcazou
  2007-08-28 12:51         ` Richard Guenther
  2007-08-28 14:33         ` Daniel Berlin
  1 sibling, 2 replies; 45+ messages in thread
From: Eric Botcazou @ 2007-08-28 12:45 UTC (permalink / raw)
  To: Richard Guenther, gcc-patches; +Cc: Daniel Berlin, Kaveh R. GHAZI

> That said, I vote for forcing stage1 to be build with a C++ compiler for
> next stage1.

I don't think it's reasonable to require a C++ compiler to build the GNU C
compiler, especially on non-GNU platforms.  You may only have a C compiler 
in the default installation and it should be sufficient to bootstrap GCC.

--
Eric Botcazou 

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 12:45       ` Eric Botcazou
@ 2007-08-28 12:51         ` Richard Guenther
  2007-08-28 16:48           ` Eric Botcazou
  2007-08-28 14:33         ` Daniel Berlin
  1 sibling, 1 reply; 45+ messages in thread
From: Richard Guenther @ 2007-08-28 12:51 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches, Daniel Berlin, Kaveh R. GHAZI

On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> > That said, I vote for forcing stage1 to be build with a C++ compiler for
> > next stage1.
>
> I don't think it's reasonable to require a C++ compiler to build the GNU C
> compiler, especially on non-GNU platforms.  You may only have a C compiler
> in the default installation and it should be sufficient to bootstrap GCC.

You can use older gcc to provide a C++ compiler.  We already require a ISO C
compiler which for example HP-UX doesn't provide.  I also only want to force
this for stage1 (that is, development stage 1), not for any released compiler,
unless, of course, we start using C++ in the middle-end.

Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 12:45       ` Eric Botcazou
  2007-08-28 12:51         ` Richard Guenther
@ 2007-08-28 14:33         ` Daniel Berlin
  2007-08-28 14:35           ` Dave Korn
  2007-08-28 15:26           ` Richard Kenner
  1 sibling, 2 replies; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 14:33 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Richard Guenther, gcc-patches, Kaveh R. GHAZI

On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> > That said, I vote for forcing stage1 to be build with a C++ compiler for
> > next stage1.
>
> I don't think it's reasonable to require a C++ compiler to build the GNU C
> compiler, especially on non-GNU platforms.  You may only have a C compiler
> in the default installation and it should be sufficient to bootstrap GCC.
>
We already require an ISO C compiler which some platforms do not
provide.  We already have a list of requirements necessary to do
development of our compiler that include a bunch of other packages.
Why is "Any version of G++ > 3.0" somehow different?

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:33         ` Daniel Berlin
@ 2007-08-28 14:35           ` Dave Korn
  2007-08-28 14:44             ` Richard Guenther
                               ` (3 more replies)
  2007-08-28 15:26           ` Richard Kenner
  1 sibling, 4 replies; 45+ messages in thread
From: Dave Korn @ 2007-08-28 14:35 UTC (permalink / raw)
  To: 'Daniel Berlin', 'Eric Botcazou'
  Cc: 'Richard Guenther', gcc-patches, 'Kaveh R. GHAZI'

On 28 August 2007 15:16, Daniel Berlin wrote:

> On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
>>> That said, I vote for forcing stage1 to be build with a C++ compiler for
>>> next stage1.
>> 
>> I don't think it's reasonable to require a C++ compiler to build the GNU C
>> compiler, especially on non-GNU platforms.  You may only have a C compiler
>> in the default installation and it should be sufficient to bootstrap GCC.
>> 
> We already require an ISO C compiler which some platforms do not
> provide.  We already have a list of requirements necessary to do
> development of our compiler that include a bunch of other packages.
> Why is "Any version of G++ > 3.0" somehow different?

  Because it completely excludes *all* native compilers?  Because it's a radical
about-turn and 180 degree shift in long-standing policy?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:35           ` Dave Korn
@ 2007-08-28 14:44             ` Richard Guenther
  2007-08-28 15:27               ` Richard Kenner
  2007-08-28 14:46             ` Gabriel Dos Reis
                               ` (2 subsequent siblings)
  3 siblings, 1 reply; 45+ messages in thread
From: Richard Guenther @ 2007-08-28 14:44 UTC (permalink / raw)
  To: Dave Korn; +Cc: Daniel Berlin, Eric Botcazou, gcc-patches, Kaveh R. GHAZI

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 15:16, Daniel Berlin wrote:
>
> > On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> >>> That said, I vote for forcing stage1 to be build with a C++ compiler for
> >>> next stage1.
> >>
> >> I don't think it's reasonable to require a C++ compiler to build the GNU C
> >> compiler, especially on non-GNU platforms.  You may only have a C compiler
> >> in the default installation and it should be sufficient to bootstrap GCC.
> >>
> > We already require an ISO C compiler which some platforms do not
> > provide.  We already have a list of requirements necessary to do
> > development of our compiler that include a bunch of other packages.
> > Why is "Any version of G++ > 3.0" somehow different?
>
>   Because it completely excludes *all* native compilers?  Because it's a radical
> about-turn and 180 degree shift in long-standing policy?

Well, make that "any C++ compiler" then.  Any moderately sane at least.  And no,
I don't see this as "radical about-turn and 180 degree shift in
long-standing policy".
What policy?

Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:35           ` Dave Korn
  2007-08-28 14:44             ` Richard Guenther
@ 2007-08-28 14:46             ` Gabriel Dos Reis
  2007-08-28 15:08             ` Daniel Berlin
  2007-08-28 15:23             ` Dave Korn
  3 siblings, 0 replies; 45+ messages in thread
From: Gabriel Dos Reis @ 2007-08-28 14:46 UTC (permalink / raw)
  To: Dave Korn
  Cc: 'Daniel Berlin', 'Eric Botcazou',
	'Richard Guenther', gcc-patches, 'Kaveh R. GHAZI'

"Dave Korn" <dave.korn@artimi.com> writes:

| Because it's a radical about-turn and 180 degree shift in
| long-standing policy? 

Like requiring GMP and MPFR, which are more difficult to get for some
platforms than a C++ compiler?   

In the long term, they pay off.

-- Gaby

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:35           ` Dave Korn
  2007-08-28 14:44             ` Richard Guenther
  2007-08-28 14:46             ` Gabriel Dos Reis
@ 2007-08-28 15:08             ` Daniel Berlin
  2007-08-28 15:19               ` Diego Novillo
  2007-08-28 15:23             ` Dave Korn
  3 siblings, 1 reply; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 15:08 UTC (permalink / raw)
  To: Dave Korn; +Cc: Eric Botcazou, Richard Guenther, gcc-patches, Kaveh R. GHAZI

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 15:16, Daniel Berlin wrote:
>
> > On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> >>> That said, I vote for forcing stage1 to be build with a C++ compiler for
> >>> next stage1.
> >>
> >> I don't think it's reasonable to require a C++ compiler to build the GNU C
> >> compiler, especially on non-GNU platforms.  You may only have a C compiler
> >> in the default installation and it should be sufficient to bootstrap GCC.
> >>
> > We already require an ISO C compiler which some platforms do not
> > provide.  We already have a list of requirements necessary to do
> > development of our compiler that include a bunch of other packages.
> > Why is "Any version of G++ > 3.0" somehow different?
>
>   Because it completely excludes *all* native compilers?

Okay, so make it "ISO C++ compiler", just not "let's hack shit up to
make it work on Visual C++".
> Because it's a radical
> about-turn and 180 degree shift in long-standing policy?
>
Not really.
We have always changed what we require in response to data that it
will promote the long term health and maintenance of GCC.

See GMP/MPFR.

I see this as no different.  We have reached a point where more than a
few of us want to do things that would be really ugly to do in C.
Heck, we reached that point a while ago.
We've kludged the compiler for years to try to emulate the nice things
we wanted out of C++ (see "union tree", variable annotations, GTY,
etc), and it's really getting ugly now.   At some point it doesn't
make sense to emulate the language anymore.  I believe we are past
that point.

--Dan

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 15:08             ` Daniel Berlin
@ 2007-08-28 15:19               ` Diego Novillo
  2007-08-28 20:57                 ` Kaveh R. GHAZI
  0 siblings, 1 reply; 45+ messages in thread
From: Diego Novillo @ 2007-08-28 15:19 UTC (permalink / raw)
  To: Daniel Berlin
  Cc: Dave Korn, Eric Botcazou, Richard Guenther, gcc-patches, Kaveh R. GHAZI

On 8/28/07, Daniel Berlin <dberlin@dberlin.org> wrote:

> I see this as no different.  We have reached a point where more than a
> few of us want to do things that would be really ugly to do in C.
> Heck, we reached that point a while ago.
> We've kludged the compiler for years to try to emulate the nice things
> we wanted out of C++ (see "union tree", variable annotations, GTY,
> etc), and it's really getting ugly now.   At some point it doesn't
> make sense to emulate the language anymore.  I believe we are past
> that point.

Agreed.  The kludgery we have in our internal code base is laughable.
We are becoming cfront parsers with feet.  Moving to a subset of ISO
C++ would help us:

1- Impose true separation between modules
2- Define a simple class hierarchy to describe all the ILs
3- Privatize data structures
4- Move many dynamic checks to compile-time checks

It is clear, however, that the resistance to move to C++ is not
technical.  We all can agree that a compiler does not require a
terribly sophisticated OO design.  It's a simple class hierarchy
coupled with a pipeline and a few other helper modules floating around
it.

I also don't believe the argument that not every system has a C++
compiler.  We are only going to restrict us to a subset of ISO C++. We
already require C99.  Requiring ISO C++ is not a big stretch.

Hopefully soon.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:35           ` Dave Korn
                               ` (2 preceding siblings ...)
  2007-08-28 15:08             ` Daniel Berlin
@ 2007-08-28 15:23             ` Dave Korn
  3 siblings, 0 replies; 45+ messages in thread
From: Dave Korn @ 2007-08-28 15:23 UTC (permalink / raw)
  To: 'Dave Korn', 'Daniel Berlin', 'Eric Botcazou'
  Cc: 'Richard Guenther', gcc-patches, 'Kaveh R. GHAZI'

On 28 August 2007 15:29, Dave Korn wrote:

> On 28 August 2007 15:16, Daniel Berlin wrote:
> 
>> On 8/28/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
>>>> That said, I vote for forcing stage1 to be build with a C++ compiler for
>>>> next stage1.
>>> 
>>> I don't think it's reasonable to require a C++ compiler to build the GNU C
>>> compiler, especially on non-GNU platforms.  You may only have a C compiler
>>> in the default installation and it should be sufficient to bootstrap GCC.
>>> 
>> We already require an ISO C compiler which some platforms do not
>> provide.  We already have a list of requirements necessary to do
>> development of our compiler that include a bunch of other packages.
>> Why is "Any version of G++ > 3.0" somehow different?
> 
>   Because it completely excludes *all* native compilers?  Because it's a
> radical about-turn and 180 degree shift in long-standing policy?

  Ah, hang on, I've been reading more of the thread.  So it's not going to be
applied to release compilers and will only ever affect those of us who work
directly on gcc from the repository.

  Ok, that's far less of a concern to me, although it does seem to me that
there's an ever-growing list of prerequisites that only ever gets longer and more
burdensome and never reduces.  What kind of barrier-to-entry effect that might or
might not cause and how that might affect the long-term health of gcc development
is a real question, but I guess it's not the kind of show-stopper I had feared.

  Please consider my ill-formed objection withdrawn!

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:33         ` Daniel Berlin
  2007-08-28 14:35           ` Dave Korn
@ 2007-08-28 15:26           ` Richard Kenner
  1 sibling, 0 replies; 45+ messages in thread
From: Richard Kenner @ 2007-08-28 15:26 UTC (permalink / raw)
  To: dberlin; +Cc: ebotcazou, gcc-patches, ghazi, richard.guenther

>  We already have a list of requirements necessary to do development
> of our compiler that include a bunch of other packages.  Why is "Any
> version of G++ > 3.0" somehow different?

The list of requirements to do *development* on the compiler is a different
list than that required for a user to *build* the compiler.  Adding things
to the first list also has to be done carefully, but *anything* we add to the
second list requires very careful consideration due to the role of GCC in
building every other tool.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 14:44             ` Richard Guenther
@ 2007-08-28 15:27               ` Richard Kenner
  2007-08-28 15:48                 ` Dave Korn
  0 siblings, 1 reply; 45+ messages in thread
From: Richard Kenner @ 2007-08-28 15:27 UTC (permalink / raw)
  To: richard.guenther; +Cc: dave.korn, dberlin, ebotcazou, gcc-patches, ghazi

> Well, make that "any C++ compiler" then.  Any moderately sane at least.
> And no, I don't see this as "radical about-turn and 180 degree shift in
> long-standing policy".  What policy?

The policy of being as cautious as possible in adding things to the list
of requirements that a user has in being able to build GCC. 

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 15:27               ` Richard Kenner
@ 2007-08-28 15:48                 ` Dave Korn
  2007-08-28 16:28                   ` Richard Guenther
  0 siblings, 1 reply; 45+ messages in thread
From: Dave Korn @ 2007-08-28 15:48 UTC (permalink / raw)
  To: 'Richard Kenner', richard.guenther
  Cc: dberlin, ebotcazou, gcc-patches, ghazi

On 28 August 2007 16:27, Richard Kenner wrote:

>> Well, make that "any C++ compiler" then.  Any moderately sane at least.
>> And no, I don't see this as "radical about-turn and 180 degree shift in
>> long-standing policy".  What policy?
> 
> The policy of being as cautious as possible in adding things to the list
> of requirements that a user has in being able to build GCC.

  Indeed, but note the significant word "user" in there; it was my error to think
this change would impact users.  It won't.

  It should probably still be --disable-able at configure time, though, just in
case some odd bug crops up in a C++ compiler and whoever gets bitten wants to
just revert to using a C compiler for bootstrap and not get side-tracked into
investigating some unrelated issue to whatever they were originally working on.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 15:48                 ` Dave Korn
@ 2007-08-28 16:28                   ` Richard Guenther
  2007-08-28 16:50                     ` Dave Korn
  0 siblings, 1 reply; 45+ messages in thread
From: Richard Guenther @ 2007-08-28 16:28 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Kenner, dberlin, ebotcazou, gcc-patches, ghazi

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 16:27, Richard Kenner wrote:
>
> >> Well, make that "any C++ compiler" then.  Any moderately sane at least.
> >> And no, I don't see this as "radical about-turn and 180 degree shift in
> >> long-standing policy".  What policy?
> >
> > The policy of being as cautious as possible in adding things to the list
> > of requirements that a user has in being able to build GCC.
>
>   Indeed, but note the significant word "user" in there; it was my error to think
> this change would impact users.  It won't.
>
>   It should probably still be --disable-able at configure time, though, just in
> case some odd bug crops up in a C++ compiler and whoever gets bitten wants to
> just revert to using a C compiler for bootstrap and not get side-tracked into
> investigating some unrelated issue to whatever they were originally working on.

Unless, of course, we start to use C++ language features.  Which is of course
the final goal of all this excercise.  But also the second.  The first
goal is to make
it easy to _try_ using C++ language features.

Richard.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 12:51         ` Richard Guenther
@ 2007-08-28 16:48           ` Eric Botcazou
  0 siblings, 0 replies; 45+ messages in thread
From: Eric Botcazou @ 2007-08-28 16:48 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches, Daniel Berlin, Kaveh R. GHAZI

> You can use older gcc to provide a C++ compiler.  We already require a ISO
> C compiler which for example HP-UX doesn't provide.  I also only want to
> force this for stage1 (that is, development stage 1), not for any released
> compiler, unless, of course, we start using C++ in the middle-end.

People (like me) test the compiler during stage 1 on non-GNU platforms,
while they mainly develop on Linux.  Please don't make it more cumbersome to 
do so on these platforms.  And, yes,  requiring GMP or MPFR for the C 
compiler is highly questionable on my opinion.

--
Eric Botcazou 


^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 16:28                   ` Richard Guenther
@ 2007-08-28 16:50                     ` Dave Korn
  2007-08-28 17:24                       ` Daniel Berlin
  0 siblings, 1 reply; 45+ messages in thread
From: Dave Korn @ 2007-08-28 16:50 UTC (permalink / raw)
  To: 'Richard Guenther'
  Cc: 'Richard Kenner', dberlin, ebotcazou, gcc-patches, ghazi

On 28 August 2007 17:10, Richard Guenther wrote:


> Unless, of course, we start to use C++ language features.  Which is of course
> the final goal of all this excercise.  But also the second.  The first
> goal is to make
> it easy to _try_ using C++ language features.

  Yeah, I appreciate that.

  OTOH that's somewhat further off down the road.

  Also, when that time comes, we *do* have to have the discussion about
increasing the requirements on ordinary users as opposed to developers.



    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 16:50                     ` Dave Korn
@ 2007-08-28 17:24                       ` Daniel Berlin
  2007-08-28 17:34                         ` Dave Korn
  0 siblings, 1 reply; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 17:24 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, Richard Kenner, ebotcazou, gcc-patches, ghazi

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 17:10, Richard Guenther wrote:
>
>
> > Unless, of course, we start to use C++ language features.  Which is of course
> > the final goal of all this excercise.  But also the second.  The first
> > goal is to make
> > it easy to _try_ using C++ language features.
>
>   Yeah, I appreciate that.
>
>   OTOH that's somewhat further off down the road.
>
>   Also, when that time comes, we *do* have to have the discussion about
> increasing the requirements on ordinary users as opposed to developers.

Yes, I can see how this would be a problem what with our *millions* of
users without C++ compilers.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 17:24                       ` Daniel Berlin
@ 2007-08-28 17:34                         ` Dave Korn
  2007-08-28 17:39                           ` Daniel Berlin
  0 siblings, 1 reply; 45+ messages in thread
From: Dave Korn @ 2007-08-28 17:34 UTC (permalink / raw)
  To: 'Daniel Berlin'
  Cc: 'Richard Guenther', 'Richard Kenner',
	ebotcazou, gcc-patches, ghazi

On 28 August 2007 18:05, Daniel Berlin wrote:

> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
>> On 28 August 2007 17:10, Richard Guenther wrote:
>> 
>> 
>>> Unless, of course, we start to use C++ language features.  Which is of course
>>> the final goal of all this excercise.  But also the second.  The first
>>> goal is to make
>>> it easy to _try_ using C++ language features.
>> 
>>   Yeah, I appreciate that.
>> 
>>   OTOH that's somewhat further off down the road.
>> 
>>   Also, when that time comes, we *do* have to have the discussion about
>> increasing the requirements on ordinary users as opposed to developers.
> 
> Yes, I can see how this would be a problem what with our *millions* of
> users without C++ compilers.

  Sarcasm is cheap, and falsified statistics are easy to pluck out of thin air,
but they're both a bit insubstantial when it comes to establishing a point.

  Is there any limit to the extra requirements we impose on end users beyond
which you /would/ believe we're making it more difficult for them?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 17:34                         ` Dave Korn
@ 2007-08-28 17:39                           ` Daniel Berlin
  2007-08-28 18:05                             ` Richard Kenner
  2007-08-28 18:06                             ` Dave Korn
  0 siblings, 2 replies; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 17:39 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, Richard Kenner, ebotcazou, gcc-patches, ghazi

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 18:05, Daniel Berlin wrote:
>
> > On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> >> On 28 August 2007 17:10, Richard Guenther wrote:
> >>
> >>
> >>> Unless, of course, we start to use C++ language features.  Which is of course
> >>> the final goal of all this excercise.  But also the second.  The first
> >>> goal is to make
> >>> it easy to _try_ using C++ language features.
> >>
> >>   Yeah, I appreciate that.
> >>
> >>   OTOH that's somewhat further off down the road.
> >>
> >>   Also, when that time comes, we *do* have to have the discussion about
> >> increasing the requirements on ordinary users as opposed to developers.
> >
> > Yes, I can see how this would be a problem what with our *millions* of
> > users without C++ compilers.
>
>   Sarcasm is cheap, and falsified statistics are easy to pluck out of thin air,
> but they're both a bit insubstantial when it comes to establishing a point.

So wait, you really believe even >10% of our users don't have C++ compilers?
And that these people compile from source?

If you do, there is no point in arguing.  I would simply say you are
vastly out of touch with reality.

>   Is there any limit to the extra requirements we impose on end users beyond
> which you /would/ believe we're making it more difficult for them?

Honestly, if it makes it better for *developers*, and the requirements
are common, no.
The vast majority of our users do not compile from source.  The number
of people who make binary packages/compile from source/etc who do not
or could not easily get a C++ compiler is near 0.
Sorry.

What I see users begging us for is a faster, smaller, better code
producing compiler.  Not a compiler that "does not add requirements".

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 17:39                           ` Daniel Berlin
@ 2007-08-28 18:05                             ` Richard Kenner
  2007-08-28 18:06                             ` Dave Korn
  1 sibling, 0 replies; 45+ messages in thread
From: Richard Kenner @ 2007-08-28 18:05 UTC (permalink / raw)
  To: dberlin; +Cc: dave.korn, ebotcazou, gcc-patches, ghazi, richard.guenther

> So wait, you really believe even >10% of our users don't have C++ compilers?
> And that these people compile from source?

The *number* of users doesn't matter here.  What matters is the dependency
graph for compiling GNU software: what depends upon what.  For a very long
time, we were unable to have GCC depend on GNU make because if we did,
we'd have created a circular dependency if GNU make required GCC.  Nowadays,
techniques have changed and this issue is *less* important, but that doesn't
mean it's completely *unimportant*.

When you want to add a new requirement for the compilation (not
development) of GCC, you have to be sure that you aren't excluding *any*
potential pathway that somebody might need in a particular configuration or
a particular port to bootstrap GCC.

And there is also the GPL issue: you can't be in a position of basically
saying that you can only compile these sources if you have a version of
these binaries already.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 17:39                           ` Daniel Berlin
  2007-08-28 18:05                             ` Richard Kenner
@ 2007-08-28 18:06                             ` Dave Korn
  2007-08-28 18:08                               ` Daniel Berlin
  1 sibling, 1 reply; 45+ messages in thread
From: Dave Korn @ 2007-08-28 18:06 UTC (permalink / raw)
  To: 'Daniel Berlin'
  Cc: 'Richard Guenther', 'Richard Kenner',
	ebotcazou, gcc-patches, ghazi

On 28 August 2007 18:24, Daniel Berlin wrote:

> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
>> On 28 August 2007 18:05, Daniel Berlin wrote:
>> 
>>> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:

>>>>   Also, when that time comes, we *do* have to have the discussion about
>>>> increasing the requirements on ordinary users as opposed to developers.
>>> 
>>> Yes, I can see how this would be a problem what with our *millions* of
>>> users without C++ compilers.
>> 
>>   Sarcasm is cheap, and falsified statistics are easy to pluck out of thin
>> air, but they're both a bit insubstantial when it comes to establishing a
>> point. 
> 
> So wait, you really believe even >10% of our users don't have C++ compilers?

  Nope, I just don't pull figures out of thin air.  Ever.

  (Plus see also Kenner's subsequent reply.  It's not just how many there are;
the number must also be weighted by how completely they're stranded beyond
recovery by the changes that we may make).

>>   Is there any limit to the extra requirements we impose on end users beyond
>> which you /would/ believe we're making it more difficult for them?
> 
> Honestly, if it makes it better for *developers*, and the requirements
> are common, no.
> The vast majority of our users do not compile from source.  The number
> of people who make binary packages/compile from source/etc who do not
> or could not easily get a C++ compiler is near 0.
> Sorry.

  For pulling figures out of thin air?  Apology accepted!  <insert HHOS tag
here!>

> What I see users begging us for is a faster, smaller, better code
> producing compiler.  Not a compiler that "does not add requirements".

  What you *see* is a private, subjective and anecdotal experience, which cannot
be made commensurable with anyone else's private subjective experiences in the
absence of direct telepathic communication.  I like hard measurements because
they can be communicated in objective terms, and I am innately suspicious of
anything that is justified by any kind of reasoning that seems to me to be an
"all-the-world's-a-X" argument.

  I'm not really sure why you're even bothering to reply when as far as you're
concerned there's nothing to discuss and there could never be any kind of problem
under any circumstances.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 18:06                             ` Dave Korn
@ 2007-08-28 18:08                               ` Daniel Berlin
  2007-08-28 18:24                                 ` Daniel Berlin
  0 siblings, 1 reply; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 18:08 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, Richard Kenner, ebotcazou, gcc-patches, ghazi

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 18:24, Daniel Berlin wrote:
>
> > On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> >> On 28 August 2007 18:05, Daniel Berlin wrote:
> >>
> >>> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
>
> >>>>   Also, when that time comes, we *do* have to have the discussion about
> >>>> increasing the requirements on ordinary users as opposed to developers.
> >>>
> >>> Yes, I can see how this would be a problem what with our *millions* of
> >>> users without C++ compilers.
> >>
> >>   Sarcasm is cheap, and falsified statistics are easy to pluck out of thin
> >> air, but they're both a bit insubstantial when it comes to establishing a
> >> point.
> >
> > So wait, you really believe even >10% of our users don't have C++ compilers?
>
>   Nope, I just don't pull figures out of thin air.  Ever.

They aren't thin air.

There are plenty of statistics that show that C++ and Java are the
most widely used languages today, and C is far behind.

The number of  users that have installed, e.g., linux distros, that
include C++ compilers but not C compiler is non-existent (feel free to
look it up, ubuntu, debian, et all have statistics.
>
>   For pulling figures out of thin air?  Apology accepted!  <insert HHOS tag
> here!>

Sorry, not going to apologize for extrapolating based on the data.
You can believe it or not.

I don't see you citing sources for *any* of your claims that it will
make things more difficult for our users.

For all you know, it could be easier for our users.  They could all
have C++ compilers, but have to have downloaded C compilers to build
GCC.

After all, any claims to the contrary would have to be "pulled out of
thin air" since you don't have numbers!


>
> > What I see users begging us for is a faster, smaller, better code
> > producing compiler.  Not a compiler that "does not add requirements".
>
>   What you *see* is a private, subjective and anecdotal experience, which cannot
> be made commensurable with anyone else's private subjective experiences in the
> absence of direct telepathic communication.  I like hard measurements because
> they can be communicated in objective terms, and I am innately suspicious of
> anything that is justified by any kind of reasoning that seems to me to be an
> "all-the-world's-a-X" argument.

IT'S ALL AN ILLUSION.


>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 18:08                               ` Daniel Berlin
@ 2007-08-28 18:24                                 ` Daniel Berlin
  2007-08-28 18:29                                   ` Dave Korn
  0 siblings, 1 reply; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 18:24 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, Richard Kenner, ebotcazou, gcc-patches, ghazi

On 8/28/07, Daniel Berlin <dberlin@dberlin.org> wrote:
> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> > On 28 August 2007 18:24, Daniel Berlin wrote:
> >
> > > On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> > >> On 28 August 2007 18:05, Daniel Berlin wrote:
> > >>
> > >>> On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:

> >   For pulling figures out of thin air?  Apology accepted!  <insert HHOS tag
> > here!>
>
> Sorry, not going to apologize for extrapolating based on the data.
> You can believe it or not.
>
> I don't see you citing sources for *any* of your claims that it will
> make things more difficult for our users.
>
> For all you know, it could be easier for our users.  They could all
> have C++ compilers, but have to have downloaded C compilers to build
> GCC.
>
> After all, any claims to the contrary would have to be "pulled out of
> thin air" since you don't have numbers!
>

BTW, The next time you want to argue about data, please don't pull
figures out of thin air by claiming to know what our users's hardship
level is and whether it will be increased or not, without real data.

After all, you are the one who claimed it would be harder for users.
Please provide your evidence and data that this is true.  Not
arguments.  Real, hard, absolute data.
After all, you wouldn't have said it if you didn't have numbers, since
you "never pull data out of thin air".

I await your reply and data!

^ permalink raw reply	[flat|nested] 45+ messages in thread

* RE: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 18:24                                 ` Daniel Berlin
@ 2007-08-28 18:29                                   ` Dave Korn
  2007-08-28 18:34                                     ` Daniel Berlin
  0 siblings, 1 reply; 45+ messages in thread
From: Dave Korn @ 2007-08-28 18:29 UTC (permalink / raw)
  To: 'Daniel Berlin'
  Cc: 'Richard Guenther', 'Richard Kenner',
	ebotcazou, gcc-patches, ghazi

On 28 August 2007 19:05, Daniel Berlin wrote:

> I don't see you citing sources for *any* of your claims that it will
> make things more difficult for our users.

On 28 August 2007 19:09, Daniel Berlin wrote:

> BTW, The next time you want to argue about data, please don't pull
> figures out of thin air by claiming to know what our users's hardship
> level is and whether it will be increased or not, without real data.
> 
> After all, you are the one who claimed it would be harder for users.
> Please provide your evidence and data that this is true.  Not
> arguments.  Real, hard, absolute data.
> After all, you wouldn't have said it if you didn't have numbers, since
> you "never pull data out of thin air".
> 
> I await your reply and data!

  You appear to have seen some claim or claims in one or more of my posts.  I am
not aware of having made any.  I wrote:

>   Also, when that time comes, we *do* have to have the discussion about
> increasing the requirements on ordinary users as opposed to developers.

  That discussion would indeed be about whether or not and to what extent if any
the change would increase the requirement on ordinary users.  I was not
prejudging or pre-empting that hypothetical future discussion, nor making any
claims about the conclusion it would reach.

  So, to sum up: I don't see you citing any sources for *any* of your claims that
I have made any claims that it will make things more difficult for our users.

  Now, shall we recurse this discussion one more level?  :-P lol

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 18:29                                   ` Dave Korn
@ 2007-08-28 18:34                                     ` Daniel Berlin
  0 siblings, 0 replies; 45+ messages in thread
From: Daniel Berlin @ 2007-08-28 18:34 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Guenther, Richard Kenner, ebotcazou, gcc-patches, ghazi

On 8/28/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 28 August 2007 19:05, Daniel Berlin wrote:
>
>   So, to sum up: I don't see you citing any sources for *any* of your claims that
> I have made any claims that it will make things more difficult for our users.

No, let's not.

I emailed you privately with a starting list of claims you have made
in this email thread, and in the past, about hardships of users, gcc
policy, et al, all without any data whatsoever.

I expect you to try to explain it all magically away, so let's do that
privately rather than continue this mess of a theoretical thread about
a world where our poor downtrodden users just can't catch a break
because we keep increasing the requirements on them.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 23:17         ` Gabriel Dos Reis
@ 2007-08-28 20:31           ` Kaveh R. GHAZI
  0 siblings, 0 replies; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-28 20:31 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: Richard Guenther, Daniel Berlin, gcc-patches

On Mon, 27 Aug 2007, Gabriel Dos Reis wrote:

> "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:
>
> [...]
>
> | It could mean making it *possible* to build with a C++ compiler, i.e. use
> | -Wc++-compat for the whole compiler but still allow using plain C to
> | bootstrap.  (Has anyone tried this recently?  Gaby?)
>
> I haven't tried recently, mostly because I have been travelling and
> away from my development machine.  I suspect this is probably a good
> time to try again.
> -- Gaby

Is it sufficient to get the code compiling with -Wc++-compat, or are there
other problems?

BTW, what exactly does -Wc++-compat warn about?  The docs only talk about
implicit coversion from void * to non-void *.  But I imagine other things
like using "class", etc could have problems.  Could you please mention
what you came across in previous attempts?

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 15:19               ` Diego Novillo
@ 2007-08-28 20:57                 ` Kaveh R. GHAZI
  2007-08-28 21:00                   ` Diego Novillo
  0 siblings, 1 reply; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-28 20:57 UTC (permalink / raw)
  To: Diego Novillo
  Cc: Daniel Berlin, Dave Korn, Eric Botcazou, Richard Guenther, gcc-patches

On Tue, 28 Aug 2007, Diego Novillo wrote:

> Agreed.  The kludgery we have in our internal code base is laughable.
> We are becoming cfront parsers with feet.  Moving to a subset of ISO
> C++ would help us:
>
> 1- Impose true separation between modules
> 2- Define a simple class hierarchy to describe all the ILs
> 3- Privatize data structures
> 4- Move many dynamic checks to compile-time checks

Yes, for #4 most of the "enable checking" stuff would become static type
checking in C++.


Oh, you forgot:

5- Templates and function overloading for const return-types. :-P


> Hopefully soon.

Yes.

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28 20:57                 ` Kaveh R. GHAZI
@ 2007-08-28 21:00                   ` Diego Novillo
  0 siblings, 0 replies; 45+ messages in thread
From: Diego Novillo @ 2007-08-28 21:00 UTC (permalink / raw)
  To: Kaveh R. GHAZI
  Cc: Daniel Berlin, Dave Korn, Eric Botcazou, Richard Guenther, gcc-patches

On 8/28/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:

> Oh, you forgot:
>
> 5- Templates and function overloading for const return-types. :-P

Ha ha ha.  Yes, I did :)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-28  8:49         ` Richard Guenther
@ 2007-08-29  8:35           ` Dirk Mueller
  0 siblings, 0 replies; 45+ messages in thread
From: Dirk Mueller @ 2007-08-29  8:35 UTC (permalink / raw)
  To: gcc-patches

On Tuesday, 28. August 2007, Richard Guenther wrote:

> as at the moment the benefits of using C++ are only theoretical and it is
> hard to try out some things as building with C++ breaks all the time.

running a regular bootstrap tester with a c++ compiler shouldn't be an awful 
lot of work though. 

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-27 16:25     ` Kaveh R. GHAZI
  2007-08-27 16:27       ` Diego Novillo
@ 2007-08-31 14:03       ` Andrew MacLeod
  2007-08-31 21:56         ` Kaveh R. GHAZI
  1 sibling, 1 reply; 45+ messages in thread
From: Andrew MacLeod @ 2007-08-31 14:03 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Diego Novillo, Daniel Berlin, gcc-patches

On Mon, 2007-08-27 at 12:15 -0400, Kaveh R. GHAZI wrote:

> 
> You "strongly object"?  I didn't realize it was such a big deal, but ok.
> 
> I'll stop adding shadow functions and iterators.  I had more in the
> pipeline, so I'm glad you guys spoke up and made your feelings about it
> clear.  I'm a bit worried about reverting existing stuff because of
> dependencies though.  Let me see what's involved.


What is the status of your investigation? All maintainers I know of want
to see all of these shadow functions reverted. The longer you wait, the
harder it would be I imagine.

Andrew

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH INSTALLED]: const typedefs part 19/N
  2007-08-31 14:03       ` Andrew MacLeod
@ 2007-08-31 21:56         ` Kaveh R. GHAZI
  0 siblings, 0 replies; 45+ messages in thread
From: Kaveh R. GHAZI @ 2007-08-31 21:56 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Diego Novillo, Daniel Berlin, gcc-patches

On Fri, 31 Aug 2007, Andrew MacLeod wrote:

> On Mon, 2007-08-27 at 12:15 -0400, Kaveh R. GHAZI wrote:
>
> >
> > You "strongly object"?  I didn't realize it was such a big deal, but ok.
> >
> > I'll stop adding shadow functions and iterators.  I had more in the
> > pipeline, so I'm glad you guys spoke up and made your feelings about it
> > clear.  I'm a bit worried about reverting existing stuff because of
> > dependencies though.  Let me see what's involved.
>
>
> What is the status of your investigation? All maintainers I know of want
> to see all of these shadow functions reverted.

Still working on the patch, I don't know yet how many of these I can get
rid of.  Certainly some of the older shadow functions will be harder than
the more recent stuff in the 19 large patches.

I've had some outages since Monday that made getting baseline and patch
testing harder.  But I'm making progress with an 8/30 snapshot as my last
baseline.


> The longer you wait, the harder it would be I imagine.
> Andrew

Not really, the shadow functions get harder to remove as they get used
more often.  I've been in a moratorium on doing any constification (not
just ones using shadow functions, but all new patches) since this came up.

Unless someone else suddenly gets an itch to take up the banner I doubt
it'll get harder.  Don't worry I'll have something ready soon and then
it's just a matter of regtesting.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2007-08-31 21:07 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-27  5:22 [PATCH INSTALLED]: const typedefs part 19/N Kaveh R. GHAZI
2007-08-27 14:35 ` Daniel Berlin
2007-08-27 14:40   ` Daniel Berlin
2007-08-27 14:44   ` Diego Novillo
2007-08-27 15:02     ` Andrew MacLeod
2007-08-27 16:25     ` Kaveh R. GHAZI
2007-08-27 16:27       ` Diego Novillo
2007-08-31 14:03       ` Andrew MacLeod
2007-08-31 21:56         ` Kaveh R. GHAZI
2007-08-27 15:00   ` Richard Guenther
2007-08-27 16:08   ` Kaveh R. GHAZI
2007-08-27 16:09     ` Diego Novillo
2007-08-27 16:22     ` Richard Guenther
2007-08-27 18:50       ` Kaveh R. GHAZI
2007-08-27 23:17         ` Gabriel Dos Reis
2007-08-28 20:31           ` Kaveh R. GHAZI
2007-08-28  8:49         ` Richard Guenther
2007-08-29  8:35           ` Dirk Mueller
2007-08-28 12:45       ` Eric Botcazou
2007-08-28 12:51         ` Richard Guenther
2007-08-28 16:48           ` Eric Botcazou
2007-08-28 14:33         ` Daniel Berlin
2007-08-28 14:35           ` Dave Korn
2007-08-28 14:44             ` Richard Guenther
2007-08-28 15:27               ` Richard Kenner
2007-08-28 15:48                 ` Dave Korn
2007-08-28 16:28                   ` Richard Guenther
2007-08-28 16:50                     ` Dave Korn
2007-08-28 17:24                       ` Daniel Berlin
2007-08-28 17:34                         ` Dave Korn
2007-08-28 17:39                           ` Daniel Berlin
2007-08-28 18:05                             ` Richard Kenner
2007-08-28 18:06                             ` Dave Korn
2007-08-28 18:08                               ` Daniel Berlin
2007-08-28 18:24                                 ` Daniel Berlin
2007-08-28 18:29                                   ` Dave Korn
2007-08-28 18:34                                     ` Daniel Berlin
2007-08-28 14:46             ` Gabriel Dos Reis
2007-08-28 15:08             ` Daniel Berlin
2007-08-28 15:19               ` Diego Novillo
2007-08-28 20:57                 ` Kaveh R. GHAZI
2007-08-28 21:00                   ` Diego Novillo
2007-08-28 15:23             ` Dave Korn
2007-08-28 15:26           ` Richard Kenner
2007-08-27 16:37   ` Richard Kenner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).