On Tue, 24 Sep 2024, Jakub Jelinek wrote: > BTW, for additional testing I've enabled the warnings (without -Werror > for them) in stage3. There are many warnings (both trailing and leading > whitespace), some of them something that can be easily fixed in the headers > or source files, but others with whitespace issues in generated sources, > so if we enable the warnings, either we'd need to adjust the generators > or disable the warnings in (some of the) generated files.
On the whole I'd prefer us to move to using spaces for indentation (so -Wleading-whitespace=spaces), but certainly =blanks corresponds better to the current intent. > --- gcc/testsuite/c-c++-common/cpp/Wleading-whitespace-2.c.jj 2024-09-23 > 20:28:31.071149603 +0200 > +++ gcc/testsuite/c-c++-common/cpp/Wleading-whitespace-2.c 2024-09-23 > 20:37:18.485944351 +0200 > @@ -0,0 +1,60 @@ > +/* { dg-do compile { target { c || c++11 } } } */ > +/* { dg-options "-Wleading-whitespace=spaces" } */ > + > + int i1; /* 4 spaces ok for -ftabstop=8 */ > + int i2; /* 2 tabs 7 spaces not ok for -ftabstop=8 */ I think the "for -ftabstop=8" bit in the comments is only relevant for -Wleading-whitespace-1.c, not this test, where the tabstop is irrelevant when only spaces are expected. The patch is OK with those comments fixed. -- Joseph S. Myers josmy...@redhat.com