summaryrefslogtreecommitdiff
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/class.c4
-rw-r--r--gcc/java/decl.c14
-rw-r--r--gcc/java/expr.c12
4 files changed, 20 insertions, 15 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 3d5b22159cd..18edb05c43d 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
+ flag for quoting.
+
2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
* parse.y (issue_warning_error_from_context): Call
diff --git a/gcc/java/class.c b/gcc/java/class.c
index f5a5bb647f2..eca80178987 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -2359,8 +2359,8 @@ layout_class_method (tree this_class, tree super_class,
&& ! flag_indirect_dispatch
&& !CLASS_FROM_SOURCE_P (this_class)
&& ! DECL_ARTIFICIAL (super_method))
- error ("%Jnon-static method '%D' overrides static method",
- method_decl, method_decl);
+ error ("non-static method %q+D overrides static method",
+ method_decl);
}
else if (this_class == object_type_node
&& (METHOD_FINAL (method_decl)
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index e63ef840af9..ec8ff4e0f7c 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1310,7 +1310,7 @@ pushdecl (tree x)
/* error_mark_node is 0 for a while during initialization! */
{
t = 0;
- error ("%J'%D' used prior to declaration", x, x);
+ error ("%q+D used prior to declaration", x);
}
/* If we're naming a hitherto-unnamed type, set its TYPE_NAME
@@ -1682,12 +1682,12 @@ poplevel (int keep, int reverse, int functionbody)
if (DECL_INITIAL (label) == 0)
{
- error ("%Jlabel '%D' used but not defined", label, label);
+ error ("label %q+D used but not defined", label);
/* Avoid crashing later. */
define_label (input_location, DECL_NAME (label));
}
else if (warn_unused[UNUSED_LABEL] && !TREE_USED (label))
- warning (0, "%Jlabel '%D' defined but not used", label, label);
+ warning (0, "label %q+D defined but not used", label);
IDENTIFIER_LABEL_VALUE (DECL_NAME (label)) = 0;
/* Put the labels into the "variables" of the
@@ -1815,8 +1815,8 @@ force_poplevels (int start_pc)
while (current_binding_level->start_pc > start_pc)
{
if (pedantic && current_binding_level->start_pc > start_pc)
- warning (0, "%JIn %D: overlapped variable and exception ranges at %d",
- current_function_decl, current_function_decl,
+ warning (0, "In %+D: overlapped variable and exception ranges at %d",
+ current_function_decl,
current_binding_level->start_pc);
poplevel (1, 0, 0);
}
@@ -1887,8 +1887,8 @@ give_name_to_locals (JCF *jcf)
tree decl = build_decl (VAR_DECL, name, type);
if (end_pc > DECL_CODE_LENGTH (current_function_decl))
{
- warning (0, "%Jbad PC range for debug info for local '%D'",
- decl, decl);
+ warning (0, "bad PC range for debug info for local %q+D",
+ decl);
end_pc = DECL_CODE_LENGTH (current_function_decl);
}
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 523bfd604f9..f3f4c84fdb3 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2730,22 +2730,22 @@ expand_java_field_op (int is_static, int is_putting, int field_ref_index)
if (FIELD_FINAL (field_decl))
{
if (DECL_CONTEXT (field_decl) != current_class)
- error ("%Jassignment to final field '%D' not in field's class",
- field_decl, field_decl);
+ error ("assignment to final field %q+D not in field's class",
+ field_decl);
else if (FIELD_STATIC (field_decl))
{
if (!DECL_CLINIT_P (current_function_decl))
- warning (0, "%Jassignment to final static field %qD not in "
+ warning (0, "assignment to final static field %q+D not in "
"class initializer",
- field_decl, field_decl);
+ field_decl);
}
else
{
tree cfndecl_name = DECL_NAME (current_function_decl);
if (! DECL_CONSTRUCTOR_P (current_function_decl)
&& !ID_FINIT_P (cfndecl_name))
- warning (0, "%Jassignment to final field '%D' not in constructor",
- field_decl, field_decl);
+ warning (0, "assignment to final field %q+D not in constructor",
+ field_decl);
}
}
java_add_stmt (build2 (MODIFY_EXPR, TREE_TYPE (field_ref),