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/objc/objc-act.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 3532d48..0c07543 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -890,8 +890,7 @@ objc_check_decl (tree decl) if (TREE_CODE (type) == RECORD_TYPE && TREE_STATIC_TEMPLATE (type) && type != constant_string_type) - error ("%H'%D' cannot be statically allocated", - &DECL_SOURCE_LOCATION (decl), decl); + error ("%J'%D' cannot be statically allocated", decl, decl); } /* Implement static typing. At this point, we know we have an interface. */ @@ -2314,9 +2313,8 @@ objc_declare_class (tree ident_list) if ((decl = lookup_name (ident))) { error ("`%s' redeclared as different kind of symbol", - IDENTIFIER_POINTER (ident)); - error ("%Hprevious declaration of '%D'", - &DECL_SOURCE_LOCATION (decl), decl); + IDENTIFIER_POINTER (ident)); + error ("%Jprevious declaration of '%D'", decl, decl); } if (! is_class_name (ident)) @@ -3414,9 +3412,7 @@ synth_forward_declarations (void) static void error_with_ivar (const char *message, tree decl, tree rawdecl) { - error ("%H%s `%s'", &DECL_SOURCE_LOCATION (decl), - message, gen_declaration (rawdecl, errbuf)); - + error ("%J%s `%s'", decl, message, gen_declaration (rawdecl, errbuf)); } static void @@ -5934,8 +5930,7 @@ start_class (enum tree_code code, tree class_name, tree super_name, { error ("`%s' redeclared as different kind of symbol", IDENTIFIER_POINTER (class_name)); - error ("%Hprevious declaration of '%D'", - &DECL_SOURCE_LOCATION (decl), decl); + error ("%Jprevious declaration of '%D'", decl, decl); } if (code == CLASS_IMPLEMENTATION_TYPE) @@ -6825,8 +6820,8 @@ static void warn_with_method (const char *message, int mtype, tree method) { /* Add a readable method name to the warning. */ - warning ("%H%s `%c%s'", &DECL_SOURCE_LOCATION (method), - message, mtype, gen_method_decl (method, errbuf)); + warning ("%J%s `%c%s'", method, message, mtype, + gen_method_decl (method, errbuf)); } /* Return 1 if METHOD is consistent with PROTO. */ -- cgit v1.1