This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
A constify patch part 5/7
- To: egcs-patches at egcs dot cygnus dot com
- Subject: A constify patch part 5/7
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 4 Mar 1999 21:22:51 -0500 (EST)
This is a constify patch, part 5/7. Okay to install?
--Kaveh
Thu Mar 4 20:48:31 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (toplev.o): Depend on $(BASIC_BLOCK_H).
* gcse.c (dump_hash_table): Qualify a char* with the `const'
keyword.
* sbitmap.c (dump_sbitmap_vector): Likewise.
* sbitmap.h (dump_sbitmap_vector): Likewise.
* toplev.c (rest_of_compilation): Likewise. Include basic-block.h.
diff -rup orig/egcs-CVS19990303/gcc/Makefile.in egcs-CVS19990303/gcc/Makefile.in
--- orig/egcs-CVS19990303/gcc/Makefile.in Tue Mar 2 16:29:34 1999
+++ egcs-CVS19990303/gcc/Makefile.in Thu Mar 4 14:48:51 1999
@@ -1435,7 +1435,7 @@ fold-const.o : fold-const.c $(CONFIG_H)
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \
- dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
+ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) $(BASIC_BLOCK_H) \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
-DTARGET_NAME=\"$(target_alias)\" \
diff -rup orig/egcs-CVS19990303/gcc/gcse.c egcs-CVS19990303/gcc/gcse.c
--- orig/egcs-CVS19990303/gcc/gcse.c Wed Feb 24 22:09:56 1999
+++ egcs-CVS19990303/gcc/gcse.c Thu Mar 4 14:33:22 1999
@@ -576,7 +576,7 @@ static void compute_set_hash_table PR
static void alloc_expr_hash_table PROTO ((int));
static void free_expr_hash_table PROTO ((void));
static void compute_expr_hash_table PROTO ((rtx));
-static void dump_hash_table PROTO ((FILE *, char *, struct expr **, int, int));
+static void dump_hash_table PROTO ((FILE *, const char *, struct expr **, int, int));
static struct expr *lookup_expr PROTO ((rtx));
static struct expr *lookup_set PROTO ((int, rtx));
static struct expr *next_set PROTO ((int, struct expr *));
@@ -1910,7 +1910,7 @@ hash_scan_insn (insn, set_p, in_libcall_
static void
dump_hash_table (file, name, table, table_size, total_size)
FILE *file;
- char *name;
+ const char *name;
struct expr **table;
int table_size, total_size;
{
diff -rup orig/egcs-CVS19990303/gcc/sbitmap.c egcs-CVS19990303/gcc/sbitmap.c
--- orig/egcs-CVS19990303/gcc/sbitmap.c Mon Jan 18 01:17:25 1999
+++ egcs-CVS19990303/gcc/sbitmap.c Thu Mar 4 14:35:15 1999
@@ -454,7 +454,7 @@ dump_sbitmap (file, bmap)
void
dump_sbitmap_vector (file, title, subtitle, bmaps, n_maps)
FILE *file;
- char *title, *subtitle;
+ const char *title, *subtitle;
sbitmap *bmaps;
int n_maps;
{
diff -rup orig/egcs-CVS19990303/gcc/sbitmap.h egcs-CVS19990303/gcc/sbitmap.h
--- orig/egcs-CVS19990303/gcc/sbitmap.h Mon Jan 11 19:07:36 1999
+++ egcs-CVS19990303/gcc/sbitmap.h Thu Mar 4 14:35:30 1999
@@ -90,7 +90,7 @@ do { \
#define sbitmap_vector_free(vec) free(vec)
extern void dump_sbitmap PROTO ((FILE *, sbitmap));
-extern void dump_sbitmap_vector PROTO ((FILE *, char *, char *,
+extern void dump_sbitmap_vector PROTO ((FILE *, const char *, const char *,
sbitmap *, int));
extern sbitmap sbitmap_alloc PROTO ((int));
diff -rup orig/egcs-CVS19990303/gcc/toplev.c egcs-CVS19990303/gcc/toplev.c
--- orig/egcs-CVS19990303/gcc/toplev.c Mon Mar 1 17:06:02 1999
+++ egcs-CVS19990303/gcc/toplev.c Thu Mar 4 14:47:55 1999
@@ -51,6 +51,7 @@ Boston, MA 02111-1307, USA. */
#include "except.h"
#include "toplev.h"
#include "expr.h"
+#include "basic-block.h"
#include "intl.h"
#ifdef DWARF_DEBUGGING_INFO
@@ -3497,7 +3498,7 @@ rest_of_compilation (decl)
if (DECL_SAVED_INSNS (decl) == 0)
{
int inlinable = 0;
- char *lose;
+ const char *lose;
/* If requested, consider whether to make this function inline. */
if (DECL_INLINE (decl) || flag_inline_functions)