On Wed, Sep 18, 2024 at 7:33 PM Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Wed, Sep 18, 2024 at 06:17:58PM +0100, Richard Sandiford wrote:
> > +1  I'd much rather learn about this kind of error before the code reaches
> > a review tool :)
> >
> > >From a quick check, it doesn't look like Clang has this, so there is no
> > existing name to follow.
>
> I was considering also -Wtrailing-whitespace, but
> 1) git diff really warns just about trailing spaces/tabs, not form feeds or
> vertical tabs
> 2) gcc source contains tons of spots with form feed in it (though,
> I think pretty much always as the sole character on a line).
> And not really sure how people use vertical tabs in the source if at all.
> Perhaps form feed could be not warned if at end of line if it isn't the sole
> character on a line...

Generally I like diagnosing this early.  For the above I'd say
-Wtrailing-whitespace=
with a set of things to diagnose (and a sane default - just spaces and
tabs - for
-Wtrailiing-whitespace) would be nice.  As for naming possibly follow the
is{space,blank,cntrl} character classifications?  If those are a good
fit, that is.

Richard.

>         Jakub
>

Reply via email to