aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-10-27 16:42:53 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2024-10-27 16:42:53 +0100
commitad7d5cd65ee35e95b067a14ed882f7beaa94bdf0 (patch)
treecc9a0254cecd16fcfa73193e66743ae383973084 /gcc/testsuite/c-c++-common/cpp
parente2ce2a4661103bc40ff3cf5fdcbf92c1243dd637 (diff)
downloadgcc-ad7d5cd65ee35e95b067a14ed882f7beaa94bdf0.zip
gcc-ad7d5cd65ee35e95b067a14ed882f7beaa94bdf0.tar.gz
gcc-ad7d5cd65ee35e95b067a14ed882f7beaa94bdf0.tar.bz2
c-family: -Wleading-whitespace= argument spelling
On Thu, Oct 24, 2024 at 03:33:25PM -0400, Eric Gallager wrote: > On Thu, Oct 24, 2024 at 4:17 AM Jakub Jelinek <jakub@redhat.com> wrote: > > I've tried to build stage3 with > > -Wleading-whitespace=blanks -Wtrailing-whitespace=blank -Wno-error=leading-whitespace=blanks -Wno-error=trailing-whitespace=blank > > So wait, it's "blanks" (plural) when it's leading, but "blank" > (singular) when it's trailing? That inconsistency bothers me... I've mentioned it already in https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664664.html Citing that here: Not sure about the kinds for the option, given -Wleading-whitespace= uses plural and this option singular and -Wleading-whitespace= spaces means literally just ' ' characters, while space in -Wtrailing-whitespace= was ' ', '\t', '\v' and '\f'; so category; perhaps just use any and blanks? Other preferences? Here is a patch to do the blank->blanks and space->any changes. 2024-10-27 Jakub Jelinek <jakub@redhat.com> gcc/ * doc/invoke.texi (Wtrailing-whitespace=): Change blank argument to blanks and space argument to any. gcc/c-family/ * c.opt (warn_trailing_whitespace_kind): Change blank to blanks and space to any. gcc/testsuite/ * c-c++-common/cpp/Wtrailing-whitespace-2.c: Use -Wtrailing-whitespace=blanks rather than -Wtrailing-whitespace=blank. * c-c++-common/cpp/Wtrailing-whitespace-3.c: Use -Wtrailing-whitespace=any rather than -Wtrailing-whitespace=space. * c-c++-common/cpp/Wtrailing-whitespace-7.c: Use -Wtrailing-whitespace=blanks rather than -Wtrailing-whitespace=blank. * c-c++-common/cpp/Wtrailing-whitespace-8.c: Use -Wtrailing-whitespace=any rather than -Wtrailing-whitespace=space.
Diffstat (limited to 'gcc/testsuite/c-c++-common/cpp')
-rw-r--r--gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-7.c2
-rw-r--r--gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-2.c b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-2.c
index b31c925..b95cd5b 100644
--- a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-2.c
+++ b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { c || c++11 } } } */
-/* { dg-options "-Wtrailing-whitespace=blank" } */
+/* { dg-options "-Wtrailing-whitespace=blanks" } */
int i;
/* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-3.c b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-3.c
index 3c3a9ac..1d42776 100644
--- a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-3.c
+++ b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { c || c++11 } } } */
-/* { dg-options "-Wtrailing-whitespace=space" } */
+/* { dg-options "-Wtrailing-whitespace=any" } */
int i;
/* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-7.c b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-7.c
index 6f9bac3..79c2160 100644
--- a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-7.c
+++ b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-7.c
@@ -1,6 +1,6 @@
/* This test uses intentionally DOS line endings (CR+LF). */
/* { dg-do compile { target { c || c++11 } } } */
-/* { dg-options "-Wtrailing-whitespace=blank" } */
+/* { dg-options "-Wtrailing-whitespace=blanks" } */
int i;
/* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c
index 29dae90..5e20ee6a 100644
--- a/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c
+++ b/gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c
@@ -1,6 +1,6 @@
/* This test uses intentionally DOS line endings (CR+LF). */
/* { dg-do compile { target { c || c++11 } } } */
-/* { dg-options "-Wtrailing-whitespace=space" } */
+/* { dg-options "-Wtrailing-whitespace=any" } */
int i;
/* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */