Commit 0d80ab91 by David Malcolm Committed by David Malcolm

Fix wording of -Wmisleading-indentation (PR c++/71497)

gcc/c-family/ChangeLog:
	PR c++/71497
	* c-indentation.c (warn_for_misleading_indentation): Use the past
	subjunctive in the note.

gcc/testsuite/ChangeLog:
	PR c++/71497
	* c-c++-common/Wmisleading-indentation-3.c: Update wording of
	expected messages.
	* c-c++-common/Wmisleading-indentation.c: Likewise.

From-SVN: r244536
parent 31b61548
2017-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/71497
* c-indentation.c (warn_for_misleading_indentation): Use the past
subjunctive in the note.
2017-01-17 Aldy Hernandez <aldyh@redhat.com>
PR c/79116
......
......@@ -608,7 +608,7 @@ warn_for_misleading_indentation (const token_indent_info &guard_tinfo,
guard_tinfo_to_string (guard_tinfo)))
inform (next_tinfo.location,
("...this statement, but the latter is misleadingly indented"
" as if it is guarded by the %qs"),
" as if it were guarded by the %qs"),
guard_tinfo_to_string (guard_tinfo));
}
}
2017-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/71497
* c-c++-common/Wmisleading-indentation-3.c: Update wording of
expected messages.
* c-c++-common/Wmisleading-indentation.c: Likewise.
2017-01-17 Vladimir Makarov <vmakarov@redhat.com>
PR target/79058
......
......@@ -17,7 +17,7 @@ fn_5 (double *a, double *b, double *sum, double *prod)
int i = 0;
for (i = 0; i < 10; i++) /* { dg-warning "3: this 'for' clause does not guard..." } */
sum[i] = a[i] * b[i];
prod[i] = a[i] * b[i]; /* { dg-message "5: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'" } */
prod[i] = a[i] * b[i]; /* { dg-message "5: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'" } */
/* { dg-begin-multiline-output "" }
for (i = 0; i < 10; i++)
^~~
......@@ -38,7 +38,7 @@ int fn_6 (int a, int b, int c)
goto fail;
if ((err = foo (b)) != 0) /* { dg-message "2: this 'if' clause does not guard..." } */
goto fail;
goto fail; /* { dg-message "3: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'" } */
goto fail; /* { dg-message "3: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'" } */
if ((err = foo (c)) != 0)
goto fail;
/* ... */
......@@ -64,7 +64,7 @@ void fn_14 (void)
int i;
FOR_EACH (i, 0, 10) /* { dg-message "in expansion of macro .FOR_EACH." } */
foo (i);
bar (i, i); /* { dg-message "5: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'" } */
bar (i, i); /* { dg-message "5: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'" } */
/* { dg-begin-multiline-output "" }
for ((VAR) = (START); (VAR) < (STOP); (VAR++))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment