[committed] libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc

Message ID 20200217132234.GA1504959@redhat.com
State New
Headers show
Series
  • [committed] libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc
Related show

Commit Message

Jonathan Wakely Feb. 17, 2020, 1:22 p.m.
* python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
	value for partial_ordering::unordered.

Tested powerpc64le-linux, committed to master.
commit 4540ef781bcefffe779a8b31950ea737733f06a4
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Feb 17 13:20:57 2020 +0000

    libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc
    
            * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
            value for partial_ordering::unordered.

Patch

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 7f69b0be9f1..e4da8dfe5b6 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -1435,7 +1435,7 @@  class StdCmpCatPrinter:
         if self.typename == 'strong_ordering' and self.val == 0:
             name = 'equal'
         else:
-            names = {-127:'unordered', -1:'less', 0:'equivalent', 1:'greater'}
+            names = {2:'unordered', -1:'less', 0:'equivalent', 1:'greater'}
             name = names[int(self.val)]
         return 'std::{}::{}'.format(self.typename, name)