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/testsuite/gcc.dg/format/gcc_diag-1.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/testsuite/gcc.dg/format') diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c index 7cf18c1..69e572e 100644 --- a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c +++ b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c @@ -60,6 +60,9 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, diag ("%H", loc); cdiag ("%H", loc); cxxdiag ("%H", loc); + diag ("%J", t1); + cdiag ("%J", t1); + cxxdiag ("%J", t1); cdiag ("%D%F%T", t1, t1, t1); cdiag ("%D%D%D%D", t1, t2, *t3, t4[5]); @@ -83,12 +86,18 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, diag ("%H"); /* { dg-warning "format" "missing arg" } */ cdiag ("%H"); /* { dg-warning "format" "missing arg" } */ cxxdiag ("%H"); /* { dg-warning "format" "missing arg" } */ + diag ("%J"); /* { dg-warning "format" "missing arg" } */ + cdiag ("%J"); /* { dg-warning "format" "missing arg" } */ + cxxdiag ("%J"); /* { dg-warning "format" "missing arg" } */ diag ("%H", i); /* { dg-warning "format" "wrong arg" } */ cdiag ("%H", i); /* { dg-warning "format" "wrong arg" } */ cxxdiag ("%H", i); /* { dg-warning "format" "wrong arg" } */ diag ("%H", p); /* { dg-warning "format" "wrong arg" } */ cdiag ("%H", p); /* { dg-warning "format" "wrong arg" } */ cxxdiag ("%H", p); /* { dg-warning "format" "wrong arg" } */ + diag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ + cdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ + cxxdiag ("%J", loc); /* { dg-warning "format" "wrong arg" } */ diag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */ cdiag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */ cxxdiag ("%#H", loc); /* { dg-warning "format" "bogus modifier" } */ -- cgit v1.1