testsuite: Add missing comment for some dg-warning
authorKewen Lin <linkw@linux.ibm.com>
Sat, 9 Oct 2021 09:17:07 +0000 (04:17 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Sat, 9 Oct 2021 09:17:07 +0000 (04:17 -0500)
commit2b3014326fb883a96601a4dde295858d715289a7
tree96f78e72243bc769f03afaaead30aacb1a57aa2a
parentb4e81f6dd48732ace73eebf1d2f46ca1d2533b79
testsuite: Add missing comment for some dg-warning

This fixes the typos introduced by commit r12-4240.

The dg-warning format looks like:

{ dg-warning regexp
    [comment [{ target/xfail selector } [line] ]] }

Some dg-warnings such as:

{ dg-warning "\\\[-Wstringop-overflow"
    { target { i?86-*-* x86_64-*-* } } }

miss the comment field, it makes target selector not take effect.

For targets which are not { i?86-*-* x86_64-*-* }, this kind of cases
fail or pass unexpectedly.

gcc/testsuite/ChangeLog:

* c-c++-common/Wstringop-overflow-2.c: Add missing comment.
* gcc.dg/Warray-bounds-51.c: Likewise.
* gcc.dg/Warray-parameter-3.c: Likewise.
* gcc.dg/Wstringop-overflow-14.c: Likewise.
* gcc.dg/Wstringop-overflow-21.c: Likewise.
* gcc.dg/Wstringop-overflow-76.c: Likewise.
gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
gcc/testsuite/gcc.dg/Warray-bounds-51.c
gcc/testsuite/gcc.dg/Warray-parameter-3.c
gcc/testsuite/gcc.dg/Wstringop-overflow-14.c
gcc/testsuite/gcc.dg/Wstringop-overflow-21.c
gcc/testsuite/gcc.dg/Wstringop-overflow-76.c