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

JitArm64: Resolve deprecated enum conversion warning #12135

Conversation

Dentomologist
Copy link
Contributor

Resolve warning caused by using values from two different enums in a conditional expression which was deprecated in c++20.

The warning is -Wdeprecated-anon-enum-enum-conversion in clang and -Wenum-compare in gcc.

An alternate resolution would be to convert the anonymous enums into static constexpr variables, but I'm not sure if the enums are leftovers from earlier c++ versions or if there's still a good reason to have them.

@JosJuice
Copy link
Member

I think it would make sense to turn them into constexpr variables.

Resolve warning caused by using values from two different enums in a
conditional expression which was deprecated in c++20.

The warning in question is clang -Wdeprecated-anon-enum-enum-conversion
and gcc -Wenum-compare.
@Dentomologist Dentomologist force-pushed the jitarm64_resolve_deprecated_enum_conversion_warning branch from 44ec03d to a650a16 Compare August 23, 2023 21:39
@Dentomologist
Copy link
Contributor Author

Done. While I was at it I moved DOUBLE_QBIT to the top of the list so it would be next to the relevant comment.

@AdmiralCurtiss AdmiralCurtiss merged commit e876045 into dolphin-emu:master Aug 26, 2023
11 checks passed
@Dentomologist Dentomologist deleted the jitarm64_resolve_deprecated_enum_conversion_warning branch August 26, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants