Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-19 Thread Jakub Jelinek
On Thu, Sep 19, 2024 at 09:07:06AM +0200, Jakub Jelinek wrote: > space is ' ' '\t' '\n' '\r' '\f' '\v' in the C locale, > blank is ' ' '\t' > cntrl is a lot of chars but not ' ' > if we extend by the safe-ctype > vspace '\r' '\n' > nvspace ' ' '\t' '\f' '\v' '\0' > Obviously, we shouldn't look at '

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-19 Thread Jakub Jelinek
On Thu, Sep 19, 2024 at 08:17:24AM +0200, Richard Biener wrote: > On Wed, Sep 18, 2024 at 7:33 PM Jakub Jelinek 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 :)

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Richard Biener
On Wed, Sep 18, 2024 at 7:33 PM Jakub Jelinek 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

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Eric Gallager
On Wed, Sep 18, 2024 at 1:33 PM Jakub Jelinek 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

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Jakub Jelinek
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 -Wtrail

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Richard Sandiford
Jeff Law writes: > On 9/18/24 10:11 AM, Jakub Jelinek wrote: >> Hi! >> >> Trailing blanks is something even git diff diagnoses; while it is a coding >> style issue, if it is so common that git diff diagnoses it, I think it could >> be useful to various projects to check that at compile time. Nic

Re: [PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Jeff Law
On 9/18/24 10:11 AM, Jakub Jelinek wrote: Hi! Trailing blanks is something even git diff diagnoses; while it is a coding style issue, if it is so common that git diff diagnoses it, I think it could be useful to various projects to check that at compile time. Dunno if it should be included in

[PATCH] libcpp: Add -Wtrailing-blanks warning

2024-09-18 Thread Jakub Jelinek
Hi! Trailing blanks is something even git diff diagnoses; while it is a coding style issue, if it is so common that git diff diagnoses it, I think it could be useful to various projects to check that at compile time. Dunno if it should be included in -Wextra, currently it isn't, and due to tons o