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

Warning -Woverloaded-virtual triggering in series_flint.h #2027

Open
bjodah opened this issue May 29, 2024 · 0 comments
Open

Warning -Woverloaded-virtual triggering in series_flint.h #2027

bjodah opened this issue May 29, 2024 · 0 comments

Comments

@bjodah
Copy link
Contributor

bjodah commented May 29, 2024

When building symengine with gcc-14 the following warning is generated:

In file included from /home/runner/work/symengine/symengine/symengine/series_generic.h:11,
                 from /home/runner/work/symengine/symengine/symengine/visitor.h:15,
                 from /home/runner/work/symengine/symengine/symengine/lambda_double.h:8,
                 from /home/runner/work/symengine/symengine/symengine/cwrapper.cpp:10:
/home/runner/work/symengine/symengine/symengine/series.h:128:23: error: ‘Teuchos::RCP<const SymEngine::Number> SymEngine::SeriesBase<Poly, Coeff, Series>::pow(const SymEngine::Number&) const [with Poly = SymEngine::fmpq_poly_wrapper; Coeff = SymEngine::fmpq_wrapper; Series = SymEngine::URatPSeriesFlint]’ was hidden [-Werror=overloaded-virtual=]
  128 |     RCP<const Number> pow(const Number &other) const override
      |                       ^~~
In file included from /home/runner/work/symengine/symengine/symengine/visitor.h:17:
/home/runner/work/symengine/symengine/symengine/series_flint.h:41:18: note:   by ‘static SymEngine::fqp_t SymEngine::URatPSeriesFlint::pow(const SymEngine::fqp_t&, int, unsigned int)’
   41 |     static fqp_t pow(const fqp_t &s, int n, unsigned prec);
      |                  ^~~
cc1plus: all warnings being treated as errors

I haven't looked much at this before, why is the method static? Is it public API, if not I guess we could rename the method to e.g. power?

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

No branches or pull requests

1 participant