aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/jcf-io.c2
-rw-r--r--gcc/java/lang.c4
-rw-r--r--gcc/java/lex.c2
-rw-r--r--gcc/java/parse.y2
5 files changed, 12 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 71fdf92..5fbc60e 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * jcf-io.c (format_uint): Const-ify.
+ * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
+ * lex.c (java_get_line_col): Likewise.
+ * parse.y (build_incdec): Likewise.
+
2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_assignment): Use lvalue's original TYPE when
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c
index a280976..ba56b18 100644
--- a/gcc/java/jcf-io.c
+++ b/gcc/java/jcf-io.c
@@ -625,7 +625,7 @@ DEFUN(format_uint, (buffer, value, base),
/* Note this code does not pretend to be optimized. */
do {
int digit = value % base;
- static char digit_chars[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+ static const char digit_chars[] = "0123456789abcdefghijklmnopqrstuvwxyz";
*--buf_ptr = digit_chars[digit];
value /= base;
} while (value != 0);
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 482d89b..7fa23a9 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -67,7 +67,7 @@ static int process_option_with_no PARAMS ((char *,
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-char java_tree_code_type[] = {
+static const char java_tree_code_type[] = {
'x',
#include "java-tree.def"
};
@@ -79,7 +79,7 @@ char java_tree_code_type[] = {
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
-int java_tree_code_length[] = {
+static const int java_tree_code_length[] = {
0,
#include "java-tree.def"
};
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 926827a..c2c4634 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -1751,7 +1751,7 @@ java_get_line_col (filename, line, col)
c = getc (fp);
if (c == EOF)
{
- static char msg[] = "<<file too short - unexpected EOF>>";
+ static const char msg[] = "<<file too short - unexpected EOF>>";
obstack_grow (&temporary_obstack, msg, sizeof(msg)-1);
goto have_line;
}
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 6fa3054..2737579 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -14147,7 +14147,7 @@ build_incdec (op_token, op_location, op1, is_post_p)
tree op1;
int is_post_p;
{
- static enum tree_code lookup [2][2] =
+ static const enum tree_code lookup [2][2] =
{
{ PREDECREMENT_EXPR, PREINCREMENT_EXPR, },
{ POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, },