Skip to content

Fix errors due to dynamic exception specification #227

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

Closed
wants to merge 3 commits into from

Conversation

dl1jbe
Copy link

@dl1jbe dl1jbe commented Feb 1, 2025

As c++17 does no longer allow dynamic exception specification the test mentioned in the PR should be restricted to c++14. Otherwise the tests will fail on modern Compilers with:

RuntimeError: Error occurred while running CASTXML xml file does not exist.

@iMichka
Copy link
Collaborator

iMichka commented Feb 3, 2025

Thanks for your pull request. This makes sense, I saw the errors but did not have time to fix them.

I am wondering if we should not remove the dynamic exception specification from the c++ files instead, so we can run the tests with newer compiler versions (and special-case the dynamic exception specifications in separate tests, if we really need/want to test that part).

@dl1jbe
Copy link
Author

dl1jbe commented Feb 4, 2025

I am wondering if we should not remove the dynamic exception specification from the c++ files instead, so we can run the tests with newer compiler versions (and special-case the dynamic exception specifications in separate tests, if we really need/want to test that part).

That sounds reasonable.

But to be honest C++ is not my main strength. So that part has to rely on your side, sorry. Maybe best to add it to a ToDo list for now and live with the patch for the time being.

@iMichka
Copy link
Collaborator

iMichka commented Feb 6, 2025

Ok this might be a little bit more tricky, but doable.

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).

This readers this method, and all related tests, pretty much useless:

@property
def exceptions(self):
"""The list of exceptions.
@type: list of :class:`declaration_t`"""
return self._exceptions
@exceptions.setter
def exceptions(self, exceptions):
self._exceptions = exceptions

I think I will move all related tests to a specific c++11 or c++14 test, which might need more work ...

iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when testes with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when tested with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when tested with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when tested with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when tested with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
iMichka added a commit that referenced this pull request Feb 13, 2025
Fix failures when tested with c++17 and above
See #227 (comment)

https://developers.redhat.com/articles/2021/08/06/porting-your-code-c17-gcc-11#exception_specification_changes
From what I read here, there is no way to add exception specifications anymore (unless you use noexcept).
@iMichka
Copy link
Collaborator

iMichka commented Feb 13, 2025

This has been fixed by #235

@iMichka iMichka closed this Feb 13, 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