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

[BUG] RTTI bug in GCC (<12.0) #223

Closed
blueloveTH opened this issue Mar 4, 2024 · 0 comments · Fixed by nesbox/TIC-80#2477
Closed

[BUG] RTTI bug in GCC (<12.0) #223

blueloveTH opened this issue Mar 4, 2024 · 0 comments · Fixed by nesbox/TIC-80#2477
Assignees
Labels
bug Something isn't working

Comments

@blueloveTH
Copy link
Collaborator

blueloveTH commented Mar 4, 2024

Description

The new py_cast<> in pkpy's main branch now uses RTTI features. However, some GCC versions won't compile due to a known bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103600

Step to reproduce

#include <typeinfo>

int main(){
    constexpr bool b = &typeid(int) == &typeid(long);
    return 0;
}

Error

error: '(((const std::type_info*)(& _ZTIi)) == ((const std::type_info*)(& _ZTIl)))' is not a constant expressionx86-64 gcc 10.3 #1

Solution

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants