From a4d9b2212cbf2912387c215da744c217de80f5d2 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sat, 13 Dec 2014 00:12:06 +0100 Subject: error.c (gfc_error): Add variant which takes a va_list. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2014-12-13 Tobias Burnus Manuel López-Ibáñez fortran/ * error.c (gfc_error): Add variant which takes a va_list. (gfc_notify_std): Convert to common diagnostic. * array.c: Use %qs, %<...%> in more gfc_error calls and for gfc_notify_std. * check.c: Ditto. * data.c: Ditto. * decl.c: Ditto. * expr.c: Ditto. * interface.c: Ditto. * intrinsic.c: Ditto. * io.c: Ditto. * match.c: Ditto. * matchexp.c: Ditto. * module.c: Ditto. * openmp.c: Ditto. * parse.c: Ditto. * primary.c: Ditto. * resolve.c: Ditto. * simplify.c: Ditto. * symbol.c: Ditto. * trans-common.c: Ditto. * trans-intrinsic.c: Ditto. gcc/testsuite/ * gfortran.dg/realloc_on_assign_21.f90: Update dg-error. * gfortran.dg/warnings_are_errors_1.f: Ditto. * gfortran.dg/warnings_are_errors_1.f90: Ditto. Co-Authored-By: Manuel López-Ibáñez From-SVN: r218694 --- gcc/fortran/expr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index bfe8356..5c2a306 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -145,7 +145,8 @@ gfc_get_constant_expr (bt type, int kind, locus *where) gfc_expr *e; if (!where) - gfc_internal_error ("gfc_get_constant_expr(): locus 'where' cannot be NULL"); + gfc_internal_error ("gfc_get_constant_expr(): locus % cannot be " + "NULL"); e = gfc_get_expr (); @@ -3185,7 +3186,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) if (rvalue->is_boz && lvalue->ts.type != BT_INTEGER && lvalue->symtree->n.sym->attr.data && !gfc_notify_std (GFC_STD_GNU, "BOZ literal at %L used to " - "initialize non-integer variable '%s'", + "initialize non-integer variable %qs", &rvalue->where, lvalue->symtree->n.sym->name)) return false; else if (rvalue->is_boz && !lvalue->symtree->n.sym->attr.data @@ -3210,15 +3211,15 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) if (rc == ARITH_UNDERFLOW) gfc_error ("Arithmetic underflow of bit-wise transferred BOZ at %L" ". This check can be disabled with the option " - "-fno-range-check", &rvalue->where); + "%<-fno-range-check%>", &rvalue->where); else if (rc == ARITH_OVERFLOW) gfc_error ("Arithmetic overflow of bit-wise transferred BOZ at %L" ". This check can be disabled with the option " - "-fno-range-check", &rvalue->where); + "%<-fno-range-check%>", &rvalue->where); else if (rc == ARITH_NAN) gfc_error ("Arithmetic NaN of bit-wise transferred BOZ at %L" ". This check can be disabled with the option " - "-fno-range-check", &rvalue->where); + "%<-fno-range-check%>", &rvalue->where); return false; } } @@ -3360,7 +3361,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) } if (!gfc_notify_std (GFC_STD_F2003, "Bounds specification " - "for '%s' in pointer assignment at %L", + "for %qs in pointer assignment at %L", lvalue->symtree->n.sym->name, &lvalue->where)) return false; @@ -3486,7 +3487,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) return false; } if (attr.proc == PROC_INTERNAL && - !gfc_notify_std(GFC_STD_F2008, "Internal procedure '%s' " + !gfc_notify_std(GFC_STD_F2008, "Internal procedure %qs " "is invalid in procedure pointer assignment " "at %L", rvalue->symtree->name, &rvalue->where)) return false; -- cgit v1.1