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

Fix g++ (13) warnings #35679

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Fix g++ (13) warnings #35679

wants to merge 2 commits into from

Conversation

kiwifb
Copy link
Member

@kiwifb kiwifb commented May 24, 2023

This PR fix two gcc warnings for C++ standard methods deprecated since the C++11 standard.

  • the first one fix is in ginac and the fix is copied from the upstream project
  • the second fix is in farey.cpp

Fixes #34996

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

Copy link
Contributor

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@vbraun
Copy link
Member

vbraun commented May 28, 2023

On OSX I get

[sagelib-10.1.beta1]     sage/modular/arithgroup/farey.cpp:742:19: error: use of undeclared identifier 'bind'; did you mean 'find'?
[sagelib-10.1.beta1]                       bind(greater<int>(), _1, 0))/2;
[sagelib-10.1.beta1]                       ^~~~
[sagelib-10.1.beta1]                       find

@mkoeppe
Copy link
Contributor

mkoeppe commented May 28, 2023

Is that with Xcode "g++"?

@kiwifb
Copy link
Member Author

kiwifb commented May 28, 2023

Looking at the C++ doc, it may need to be std::bind to be fully correct. https://en.cppreference.com/w/cpp/utility/functional/bind

@github-actions
Copy link

github-actions bot commented May 28, 2023

Documentation preview for this PR (built with commit ce15f1e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@kiwifb
Copy link
Member Author

kiwifb commented May 28, 2023

Looking at the C++ doc, it may need to be std::bind to be fully correct. https://en.cppreference.com/w/cpp/utility/functional/bind

I now see there is using namespace std; at the beginning of the file, so not the problem.

@vbraun
Copy link
Member

vbraun commented May 28, 2023

Yes thats with the Xcode gcc, e.g. BigSur:

buildbot-sage@bigsur-osx build % gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@mkoeppe
Copy link
Contributor

mkoeppe commented May 1, 2024

A change to farey was done in #37646.

@mkoeppe
Copy link
Contributor

mkoeppe commented May 1, 2024

Rebased.
I don't know if this extra line in farey is necessary

@kiwifb
Copy link
Member Author

kiwifb commented May 1, 2024

And that's the bit Volker had problem with. I should redo the branch.

@kiwifb
Copy link
Member Author

kiwifb commented May 1, 2024

Rebased. I don't know if this extra line in farey is necessary

I would think it is, but it is only fatal if you are strict (which is a promised future behaviour).

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

Successfully merging this pull request may close these issues.

Replace code deprecated in C++17
4 participants