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

commit a1d67baf72933c8a2ed3e2b6459e02e2d01caef2
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Sep 10 16:52:50 2020

    libstdc++: Clean up inconsistent whitespace
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/locale_facets_nonio.tcc: Adjust whitespace.

diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
index 17b12c92f6c..ff84d7349cd 100644
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
@@ -456,20 +456,20 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
 	    // grouping rules.
 	    long __paddec = __len - __lc->_M_frac_digits;
 	    if (__paddec > 0)
-  	      {
+	      {
 		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 = 
+		    _CharT* __vend =
 		      std::__add_grouping(&__value[0], __lc->_M_thousands_sep,
 					  __lc->_M_grouping,
 					  __lc->_M_grouping_size,
 					  __beg, __beg + __paddec);
 		    __value.erase(__vend - &__value[0]);
-  		  }
-  		else
+		  }
+		else
 		  __value.assign(__beg, __paddec);
 	      }
 
@@ -485,7 +485,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
 		    __value.append(-__paddec, __lit[money_base::_S_zero]);
 		    __value.append(__beg, __len);
 		  }
-  	      }
+	      }
   
 	    // Calculate length of resulting string.
 	    const ios_base::fmtflags __f = __io.flags() 

Reply via email to