Blame SOURCES/gdb-rhbz795424-bitpos-arrayview.patch

475228
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
475228
From: Sergio Durigan Junior <sergiodj@redhat.com>
475228
Date: Wed, 12 Sep 2018 00:02:17 -0400
475228
Subject: gdb-rhbz795424-bitpos-arrayview.patch
475228
475228
;; This patch is needed to compile GDB after -Werror=narrowing has
475228
;; been enabled by default.
475228
;; Author: Sergio Durigan Junior.
475228
475228
diff --git a/gdb/common/array-view.h b/gdb/common/array-view.h
475228
--- a/gdb/common/array-view.h
475228
+++ b/gdb/common/array-view.h
475228
@@ -85,7 +85,7 @@ public:
475228
   using value_type = T;
475228
   using reference = T &;
475228
   using const_reference = const T &;
475228
-  using size_type = size_t;
475228
+  using size_type = ULONGEST;
475228
 
475228
   /* Default construction creates an empty view.  */
475228
   constexpr array_view () noexcept
475228
@@ -114,7 +114,7 @@ public:
475228
      count.  */
475228
   template
475228
 	   typename = Requires<DecayedConvertible<U>>>
475228
-  constexpr array_view (U *array, size_t size) noexcept
475228
+  constexpr array_view (U *array, ULONGEST size) noexcept
475228
     : m_array (array), m_size (size)
475228
   {}
475228
 
475228
@@ -128,7 +128,7 @@ public:
475228
   {}
475228
 
475228
   /* Create an array view from an array.  */
475228
-  template
475228
+  template
475228
 	   typename = Requires<DecayedConvertible<U>>>
475228
   constexpr array_view (U (&array)[Size]) noexcept
475228
     : m_array (array), m_size (Size)
475228
@@ -161,9 +161,9 @@ public:
475228
   /*constexpr14*/ T *end () noexcept { return m_array + m_size; }
475228
   constexpr const T *end () const noexcept { return m_array + m_size; }
475228
 
475228
-  /*constexpr14*/ reference operator[] (size_t index) noexcept
475228
+  /*constexpr14*/ reference operator[] (ULONGEST index) noexcept
475228
   { return m_array[index]; }
475228
-  constexpr const_reference operator[] (size_t index) const noexcept
475228
+  constexpr const_reference operator[] (ULONGEST index) const noexcept
475228
   { return m_array[index]; }
475228
 
475228
   constexpr size_type size () const noexcept { return m_size; }
475228
@@ -196,7 +196,7 @@ operator== (const gdb::array_view<T> &lhs, const gdb::array_view<T> &rhs)
475228
   if (lhs.size () != rhs.size ())
475228
     return false;
475228
 
475228
-  for (size_t i = 0; i < lhs.size (); i++)
475228
+  for (ULONGEST i = 0; i < lhs.size (); i++)
475228
     if (!(lhs[i] == rhs[i]))
475228
       return false;
475228