Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error with GCC 15 in Fedora Rawhide #321

Open
musicinmybrain opened this issue Jan 17, 2025 · 0 comments · May be fixed by #322
Open

Compiler error with GCC 15 in Fedora Rawhide #321

musicinmybrain opened this issue Jan 17, 2025 · 0 comments · May be fixed by #322

Comments

@musicinmybrain
Copy link
Contributor

The system compiler was just updated to a GCC 15 pre-release in Fedora Rawhide, the development version of the distribution, and I see a regression in the form of a compiler error.

I already looked at #319 and applied 4a1e139 as a patch.

Now I see:

In file included from ../../linbox/matrix/sparse-matrix.h:87:
../../linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h: In member function 'void LinBox::SparseMatrix<Field_, LinBox::SparseMatrixFormat::TPL_omp>::rebind<Tp1_>::operator()(other&, const LinBox::SparseMatrix<Field_, LinBox::SparseMatrixFormat::TPL_omp>::Self_t&)':
../../linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h:321:43: error: 'const LinBox::SparseMatrix<Field_, LinBox::SparseMatrixFormat::TPL_omp>::Self_t' has no member named 'data'; did you mean 'data_'? [-Wtemplate-body]
  321 |                         Ap.data_.resize(A.data.size());  
      |                                           ^~~~
      |                                           data_
../../linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h:323:39: error: 'const LinBox::SparseMatrix<Field_, LinBox::SparseMatrixFormat::TPL_omp>::Self_t' has no member named 'data'; did you mean 'data_'? [-Wtemplate-body]
  323 |                              v_p != A.data.end(); ++ v_p, ++ vp_p)
      |                                       ^~~~
      |                                       data_

Looking at

Ap.data_.resize(A.data.size());
for (v_p = A.data_.begin(), vp_p = Ap.data_.begin();
v_p != A.data.end(); ++ v_p, ++ vp_p)

and noting that there is already a mixture of .data and .data_, I tried

diff --git a/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h b/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h
index feca4cf35..c97b1c8c1 100644
--- a/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h
+++ b/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h
@@ -318,9 +318,9 @@ class SparseMatrix<Field_, SparseMatrixFormat::TPL_omp> : public BlackboxInterfa
                        typedef typename selfvec::const_iterator selfiter;
                        otheriter vp_p; selfiter v_p;
 
-                       Ap.data_.resize(A.data.size());
+                       Ap.data_.resize(A.data_.size());
                        for (v_p = A.data_.begin(), vp_p = Ap.data_.begin();
-                            v_p != A.data.end(); ++ v_p, ++ vp_p)
+                            v_p != A.data_.end(); ++ v_p, ++ vp_p)
                                hom.image (vp_p->elt, v_p->elt);
                }
        };

and this seemed to work, so I’m going to offer that as a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant