From ddd2d57e722237230da8eea70a2fcecb11bd0f81 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 20 Sep 2003 22:07:20 -0700 Subject: 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 --- gcc/java/expr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gcc/java/expr.c') 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); -- cgit v1.1