diff options
author | Richard Henderson <rth@redhat.com> | 2003-09-20 22:07:20 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-09-20 22:07:20 -0700 |
commit | ddd2d57e722237230da8eea70a2fcecb11bd0f81 (patch) | |
tree | 28f355780724c452ad42bb81a3672b2e8010c989 /gcc/java | |
parent | ccea753c0563b847b42d9ca5fc1b8afaee49f343 (diff) | |
download | gcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.zip gcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.tar.gz gcc-ddd2d57e722237230da8eea70a2fcecb11bd0f81.tar.bz2 |
c-format.c (gcc_diag_char_table): Add %J.
* c-format.c (gcc_diag_char_table): Add %J.
(gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise.
(check_format_types): Fix wanted_type name lookup.
(init_dynamic_diag_info): Setup %J.
* diagnostic.c (text_specifies_location): Implement %J.
* c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c,
dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c,
tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c,
config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c,
config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics.
* tree-inline.c: Include intl.h
(inline_forbidden_p_1): Fix i18n of inline_forbidden_reason.
* Makefile.in (tree-inline.o): Update.
cp/
* decl.c, decl2.c, pt.c: Use %J in diagnostics.
java/
* check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
testsuite/
* gcc.dg/format/gcc_diag-1.c: Add tests for %J.
From-SVN: r71619
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/check-init.c | 4 | ||||
-rw-r--r-- | gcc/java/class.c | 7 | ||||
-rw-r--r-- | gcc/java/decl.c | 19 | ||||
-rw-r--r-- | gcc/java/expr.c | 13 |
5 files changed, 23 insertions, 24 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 6c6b157..a14c1db 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2003-09-20 Richard Henderson <rth@redhat.com> + + * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. + 2003-09-18 Roger Sayle <roger@eyesopen.com> * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c index 04ce354..03af2fa 100644 --- a/gcc/java/check-init.c +++ b/gcc/java/check-init.c @@ -976,8 +976,8 @@ check_for_initialization (tree body, tree mdecl) if (index >= 0 && ! ASSIGNED_P (before, index)) { if (! is_finit_method) - error ("%Hfinal field '%D' may not have been initialized", - &DECL_SOURCE_LOCATION (decl), decl); + error ("%Jfinal field '%D' may not have been initialized", + decl, decl); } else if (is_finit_method) DECL_FIELD_FINAL_IUD (decl) = 1; diff --git a/gcc/java/class.c b/gcc/java/class.c index a1c7249..e3e6cc3 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1211,8 +1211,7 @@ get_dispatch_table (tree type, tree this_class_addr) if (METHOD_ABSTRACT (method)) { if (! abstract_p) - warning ("%Habstract method in non-abstract class", - &DECL_SOURCE_FILE (method)); + warning ("%Jabstract method in non-abstract class", method); if (TARGET_VTABLE_USES_DESCRIPTORS) for (j = 0; j < TARGET_VTABLE_USES_DESCRIPTORS; ++j) @@ -1986,8 +1985,8 @@ layout_class_method (tree this_class, tree super_class, DECL_VINDEX (method_decl) = DECL_VINDEX (super_method); if (DECL_VINDEX (method_decl) == NULL_TREE && !CLASS_FROM_SOURCE_P (this_class)) - error ("%Hnon-static method '%D' overrides static method", - &DECL_SOURCE_LOCATION (method_decl), method_decl); + error ("%Jnon-static method '%D' overrides static method", + method_decl, method_decl); } else if (! METHOD_FINAL (method_decl) && ! METHOD_PRIVATE (method_decl) diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 90978e4..7ddf704 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1019,8 +1019,7 @@ pushdecl (tree x) /* error_mark_node is 0 for a while during initialization! */ { t = 0; - error ("%H'%D' used prior to declaration", - &DECL_SOURCE_LOCATION (x), x); + error ("%J'%D' used prior to declaration", x, x); } /* If we're naming a hitherto-unnamed type, set its TYPE_NAME @@ -1356,14 +1355,12 @@ poplevel (int keep, int reverse, int functionbody) if (DECL_INITIAL (label) == 0) { - error ("%Hlabel '%D' used but not defined", - &DECL_SOURCE_LOCATION (label), label); + error ("%Jlabel '%D' used but not defined", label, label); /* Avoid crashing later. */ define_label (input_location, DECL_NAME (label)); } else if (warn_unused[UNUSED_LABEL] && !TREE_USED (label)) - warning ("%Hlabel '%D' defined but not used", - &DECL_SOURCE_LOCATION (label), label); + warning ("%Jlabel '%D' defined but not used", label, label); IDENTIFIER_LABEL_VALUE (DECL_NAME (label)) = 0; /* Put the labels into the "variables" of the @@ -1491,9 +1488,9 @@ force_poplevels (int start_pc) while (current_binding_level->start_pc > start_pc) { if (pedantic && current_binding_level->start_pc > start_pc) - warning ("%HIn %D: overlapped variable and exception ranges at %d", - &DECL_SOURCE_LOCATION (current_function_decl), - current_function_decl, current_binding_level->start_pc); + warning ("%JIn %D: overlapped variable and exception ranges at %d", + current_function_decl, current_function_decl, + current_binding_level->start_pc); expand_end_bindings (getdecls (), 1, 0); poplevel (1, 0, 0); } @@ -1578,8 +1575,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 ("%Hbad PC range for debug info for local '%D'", - &DECL_SOURCE_LOCATION (decl), decl); + warning ("%Jbad PC range for debug info for local '%D'", + decl, decl); end_pc = DECL_CODE_LENGTH (current_function_decl); } diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 94f23f3..803c2de 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2335,22 +2335,21 @@ 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 ("%Hassignment to final field '%D' not in field's class", - &DECL_SOURCE_LOCATION (field_decl), field_decl); + error ("%Jassignment to final field '%D' not in field's class", + field_decl, field_decl); else if (FIELD_STATIC (field_decl)) { if (!DECL_CLINIT_P (current_function_decl)) - warning ("assignment to final static field `%s' not in " - "class initializer", - &DECL_SOURCE_LOCATION (field_decl), field_decl); + warning ("%Jassignment to final static field `%D' not in " + "class initializer", 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 ("%Hassignment to final field '%D' not in constructor", - &DECL_SOURCE_LOCATION (field_decl), field_decl); + warning ("%Jassignment to final field '%D' not in constructor", + field_decl, field_decl); } } expand_assignment (field_ref, new_value, 0); |