File: 1001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch

package info (click to toggle)
aspell 0.60.8.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,304 kB
  • sloc: cpp: 24,374; sh: 12,327; perl: 1,921; ansic: 1,661; makefile: 835; sed: 16
file content (45 lines) | stat: -rw-r--r-- 2,132 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Sun, 21 Jul 2024 22:01:50 +0100
Origin: upstream, https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041
Bug-Debian: https://bugs.debian.org/1096334
Subject: [PATCH] modules/speller/default/vector_hash-t.hpp: fix gcc-15 build

Uncoming `gcc-15` added extra checks for template instantiation that is
guaranteed to fail in
  https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=313afcfdabeab3e6705ac0bd1273627075be0023

As a result `aspell` build now fails as:

    In file included from modules/speller/default/readonly_ws.cpp:51:
    modules/speller/default/vector_hash-t.hpp: In member function 'void aspeller::VectorHashTable<Parms>::recalc_size()':
    modules/speller/default/vector_hash-t.hpp:186:43: error: 'class aspeller::VectorHashTable<Parms>' has no member named 'e'
      186 |     for (iterator i = begin(); i != this->e; ++i, ++this->_size);
          |                                           ^
    modules/speller/default/vector_hash-t.hpp:186:59: error: 'class aspeller::VectorHashTable<Parms>' has no member named '_size'; did you mean 'size'?
      186 |     for (iterator i = begin(); i != this->e; ++i, ++this->_size);
          |                                                           ^~~~~
          |                                                           size

It looks like `_size` is `size_` mis-spelling and `e` was not introduced
here.
---
 modules/speller/default/vector_hash-t.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/speller/default/vector_hash-t.hpp b/modules/speller/default/vector_hash-t.hpp
index 969a80c..e4420b4 100644
--- a/modules/speller/default/vector_hash-t.hpp
+++ b/modules/speller/default/vector_hash-t.hpp
@@ -183,7 +183,7 @@ namespace aspeller {
   template<class Parms>
   void VectorHashTable<Parms>::recalc_size() {
     size_ = 0;
-    for (iterator i = begin(); i != this->e; ++i, ++this->_size);
+    for (iterator i = begin(), e = end(); i != e; ++i, ++size_);
   }
 
 }
-- 
2.47.2