re PR fortran/68815 (Error/warning diagnostic: '%s' should be converted to %qs-like or %<%s%>-like string strings)

2014-12-12  Tobias Burnus  <burnus@net-b.de>

gcc/c-family/
        PR fortran/68815
        * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
        specifiers (%d, %i,%u and %c).

gcc/fortran/
        PR fortran/68815
        * check.c (gfc_check_reshape): Replace %<%d%> by %qd.
        * matchexp.c (gfc_match_defined_op_name): Use %qc.
        * symbol.c (gfc_add_new_implicit_range,
        gfc_merge_new_implicit): Ditto.

From-SVN: r231584
This commit is contained in:
Tobias Burnus 2015-12-12 19:55:25 +01:00 committed by Tobias Burnus
parent 68f7e79ea7
commit 8d4227c89b
6 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2014-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/68815
* c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
specifiers (%d, %i,%u and %c).
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* c.opt (Wmisleading-indentation): Add to -Wall for C and C++.

View File

@ -809,9 +809,9 @@ static const format_char_info gcc_cxxdiag_char_table[] =
static const format_char_info gcc_gfc_char_table[] =
{
/* C89 conversion specifiers. */
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "cR", NULL },
/* gfc conversion specifiers. */

View File

@ -1,3 +1,11 @@
2014-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/68815
* check.c (gfc_check_reshape): Replace %<%d%> by %qd.
* matchexp.c (gfc_match_defined_op_name): Use %qc.
* symbol.c (gfc_add_new_implicit_range,
gfc_merge_new_implicit): Ditto.
2015-12-10 David Malcolm <dmalcolm@redhat.com>
* io.c (gfc_match_open): Fix indentation.

View File

@ -3863,7 +3863,7 @@ gfc_check_reshape (gfc_expr *source, gfc_expr *shape,
{
gfc_error ("%qs argument of %qs intrinsic at %L has "
"invalid permutation of dimensions (dimension "
"%<%d%> duplicated)",
"%qd duplicated)",
gfc_current_intrinsic_arg[3]->name,
gfc_current_intrinsic, &e->where, dim);
return false;

View File

@ -69,7 +69,7 @@ gfc_match_defined_op_name (char *result, int error_flag)
for (i = 0; name[i]; i++)
if (!ISALPHA (name[i]))
{
gfc_error ("Bad character %<%c%> in OPERATOR name at %C", name[i]);
gfc_error ("Bad character %qc in OPERATOR name at %C", name[i]);
return MATCH_ERROR;
}

View File

@ -165,7 +165,7 @@ gfc_add_new_implicit_range (int c1, int c2)
{
if (new_flag[i])
{
gfc_error ("Letter %<%c%> already set in IMPLICIT statement at %C",
gfc_error ("Letter %qc already set in IMPLICIT statement at %C",
i + 'A');
return false;
}
@ -197,7 +197,7 @@ gfc_merge_new_implicit (gfc_typespec *ts)
{
if (gfc_current_ns->set_flag[i])
{
gfc_error ("Letter %c already has an IMPLICIT type at %C",
gfc_error ("Letter %qc already has an IMPLICIT type at %C",
i + 'A');
return false;
}