[PATCH] libstdc++: fix misleading indentation
Jonathan Wakely
jwakely@redhat.com
Thu Sep 10 15:53:24 GMT 2020
On 24/08/20 13:26 +0200, Krystian Kuźniarek via Libstdc++ wrote:
>Hi,
>
>First of all, sorry, I must have sent it as quoted-printable so spaces and
>tabs are preserved.
>
>A description of the problem/bug and how your patch addresses it:
>I've got a small patch for -Wmisleading-indentation in system headers.
Ugh, the whitespace in that file is a mess. I can't reproduce this
warning though.
I'll commit a slightly different fix though. Thanks for pointing it
out.
>Testcases:
>N/A, it's only a warning.
>
>ChangeLog:
>Sorry, contrib/mklog.py didn't quite work for me.
>For some reason after instruction in line 129: "diff = PatchSet(data)" my
>"diff" variable is always empty.
>
>Bootstrapping and testing:
>Tested that manually by recompling GCC, unfolding all headers with
>`#include <stdc++.h>` and compiling what's been included by it.
>
>The patch itself:
>
>diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>index 17b12c92f6c..7f40a0b306a 100644
>--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>@@ -459,7 +459,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
> {
> if (__lc->_M_frac_digits < 0)
> __paddec = __len;
>- if (__lc->_M_grouping_size)
>+ if (__lc->_M_grouping_size)
> {
> __value.assign(2 * __paddec, char_type());
> _CharT* __vend =
>@@ -469,9 +469,9 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
> __beg, __beg + __paddec);
> __value.erase(__vend - &__value[0]);
> }
>- else
>+ else
> __value.assign(__beg, __paddec);
>- }
>+ }
>
> // Deal with decimal point, decimal digits.
> if (__lc->_M_frac_digits > 0)
>
>
>
>Best regards,
>Krystian
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1546 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200910/64d537c2/attachment.bin>
More information about the Libstdc++
mailing list