This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch installed for minor const-ification


Moves a few bytes from .data to .rodata.
Bootstrapped on sparc-sun-solaris2.7.

Installed as obvious.



2002-08-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* c-opts.c (lang_flags): Const-ify.
	* ra-build.c (undef_table): Likewise.
	* ra.c (eliminables): Likewise.

diff -rup orig/egcc-CVS20020812/gcc/c-opts.c egcc-CVS20020812/gcc/c-opts.c
--- orig/egcc-CVS20020812/gcc/c-opts.c	2002-08-12 07:00:24.000000000 -0400
+++ egcc-CVS20020812/gcc/c-opts.c	2002-08-12 15:06:24.061530203 -0400
@@ -456,7 +456,7 @@ c_common_decode_option (argc, argv)
      int argc;
      char **argv;
 {
-  static int lang_flags[] = {CL_C_ONLY, CL_C, CL_CXX_ONLY, CL_CXX};
+  static const int lang_flags[] = {CL_C_ONLY, CL_C, CL_CXX_ONLY, CL_CXX};
   size_t opt_index;
   const char *opt, *arg = 0;
   char *dup = 0;
diff -rup orig/egcc-CVS20020812/gcc/ra-build.c egcc-CVS20020812/gcc/ra-build.c
--- orig/egcc-CVS20020812/gcc/ra-build.c	2002-08-10 08:28:36.000000000 -0400
+++ egcc-CVS20020812/gcc/ra-build.c	2002-08-12 15:30:10.001609365 -0400
@@ -346,7 +346,7 @@ static struct undef_table_s {
   unsigned int new_undef;
   /* size | (byte << 16)  */
   unsigned int size_word;
-} undef_table [] = {
+} const undef_table [] = {
   { 0, BL_TO_WORD (0, 0)}, /* 0 */
   { 0, BL_TO_WORD (0, 1)},
   { 0, BL_TO_WORD (1, 1)},
diff -rup orig/egcc-CVS20020812/gcc/ra.c egcc-CVS20020812/gcc/ra.c
--- orig/egcc-CVS20020812/gcc/ra.c	2002-07-23 07:00:24.000000000 -0400
+++ egcc-CVS20020812/gcc/ra.c	2002-08-12 15:07:51.246975868 -0400
@@ -464,7 +464,7 @@ init_ra ()
   int i;
   HARD_REG_SET rs;
 #ifdef ELIMINABLE_REGS
-  static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
+  static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS;
   unsigned int j;
 #endif
   int need_fp


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]