aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/expr.c2
-rw-r--r--gcc/java/parse.y14
3 files changed, 13 insertions, 8 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index ba4a3b2..95aafb3 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * expr.c (expand_invoke): Const-ification.
+ * parse.y (patch_method_invocation): Likewise.
+
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (cxx_keywords): Const-ification.
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index d1cc19e..ff0a327 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1916,7 +1916,7 @@ expand_invoke (opcode, method_ref_index, nargs)
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
tree self_type = get_class_constant
(current_jcf, COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool, method_ref_index));
- const char *self_name
+ const char *const self_name
= IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree call, func, method, arg_list, method_type;
tree check = NULL_TREE;
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 62f231c..ee528dc 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -10308,15 +10308,15 @@ patch_method_invocation (patch, primary, where, from_super,
/* Calls to clone() on array types are permitted as a special-case. */
&& !is_array_clone_call)
{
- const char *fct_name = IDENTIFIER_POINTER (DECL_NAME (list));
- const char *access =
+ const char *const fct_name = IDENTIFIER_POINTER (DECL_NAME (list));
+ const char *const access =
java_accstring_lookup (get_access_flags_from_decl (list));
- const char *klass =
+ const char *const klass =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (DECL_CONTEXT (list))));
- const char *refklass =
+ const char *const refklass =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class)));
- const char *what = (DECL_CONSTRUCTOR_P (list)
- ? "constructor" : "method");
+ const char *const what = (DECL_CONSTRUCTOR_P (list)
+ ? "constructor" : "method");
/* FIXME: WFL yields the wrong message here but I don't know
what else to use. */
parse_error_context (wfl,
@@ -14828,7 +14828,7 @@ array_constructor_check_entry (type, entry)
/* Check and report errors */
if (!new_value)
{
- const char *msg = (!valid_cast_to_p (type_value, type) ?
+ const char *const msg = (!valid_cast_to_p (type_value, type) ?
"Can't" : "Explicit cast needed to");
if (!array_type_string)
array_type_string = xstrdup (lang_printable_name (type, 1));