Skip to content

conditionally remove long-deprecated in C++ "register" in types#5

Closed
dimpase wants to merge 0 commit intomalb:masterfrom
dimpase:master
Closed

conditionally remove long-deprecated in C++ "register" in types#5
dimpase wants to merge 0 commit intomalb:masterfrom
dimpase:master

Conversation

@dimpase
Copy link
Copy Markdown

@dimpase dimpase commented Jun 27, 2025

See #6 for a better fix.

in particular, as Sage moves to C++17, it becomes crucial. And "register" has purely nostalgic meaning nowadays, anyway

@malb
Copy link
Copy Markdown
Owner

malb commented Jun 27, 2025

Is Sage compiling M4RIE as C++ and not as C?

@dimpase
Copy link
Copy Markdown
Author

dimpase commented Jun 27, 2025

Sage does the default thing when building m4rie. The error I see happens when building the interface to it, on macOS with a recent xcode, something that used Apple clang 16 or 17 (it enforces C++17 by default). The error goes away if I remove register in its headers.

@dimpase
Copy link
Copy Markdown
Author

dimpase commented Jun 27, 2025

Perhaps it's actually a strictly Sage bug - for some strange reason src/sage/libs/m4ri.pxd has # distutils: language = c++ - which probably induces C++ for m4rie.pxd as well, as it's included in the latter, and as a result m4rie extension is built as C++ extension.

Let me try to remove that # distutils: and see how it goes without.

@dimpase dimpase marked this pull request as draft June 27, 2025 17:02
@dimpase
Copy link
Copy Markdown
Author

dimpase commented Jun 27, 2025

OK, I'll change this to something which only touches one header file, and is conditional on being compiled with C++.

@dimpase dimpase changed the title remove long-deprecated in C++ "register" in types conditionally remove long-deprecated in C++ "register" in types Jun 27, 2025
@dimpase dimpase closed this Jun 27, 2025
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 this pull request may close these issues.

2 participants