From: Jakub Jelinek Date: Thu, 15 Aug 2024 20:50:07 +0000 (+0200) Subject: fortran: Fix bootstrap in resolve.cc [PR116387] X-Git-Tag: basepoints/gcc-16~6614 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f8b11968472ff12674d67fd856610646b373bd0;p=thirdparty%2Fgcc.git fortran: Fix bootstrap in resolve.cc [PR116387] The r15-2934 change broke bootstrap: ../../gcc/fortran/resolve.cc: In function ‘bool resolve_operator(gfc_expr*)’: ../../gcc/fortran/resolve.cc:4649:22: error: too many arguments for format [-Werror=format-extra-args] 4649 | gfc_error ("Inconsistent coranks for operator at %%L and %%L", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following patch fixes that by using %L rather than %%L, the call has 2 location arguments. 2024-08-15 Jakub Jelinek PR bootstrap/116387 * resolve.cc (resolve_operator): Use %L rather than %%L in format string. --- diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index 71312e0e415..12973c6bc85 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -4646,7 +4646,7 @@ resolve_operator (gfc_expr *e) } else { - gfc_error ("Inconsistent coranks for operator at %%L and %%L", + gfc_error ("Inconsistent coranks for operator at %L and %L", &op1->where, &op2->where); return false; }