Skip to content

recompiler: remove static_assert(false) from a template#2219

Merged
LukeUsher merged 1 commit intoares-emulator:masterfrom
pekkavaa:fix-gcc-recompiler-build
Sep 15, 2025
Merged

recompiler: remove static_assert(false) from a template#2219
LukeUsher merged 1 commit intoares-emulator:masterfrom
pekkavaa:fix-gcc-recompiler-build

Conversation

@pekkavaa
Copy link
Copy Markdown
Contributor

@pekkavaa pekkavaa commented Sep 15, 2025

This is a fix that was supposed to go in as part of #2133 but got missing due to a rebase mishap.


I had to change the setup_arg template function to check unknown types a bit differently because static_assert is evaluated before instantiation https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2593r1.html

GCC evaluated the always failing assert before the constexprs leading to it, resulting in a compilation failure. As a workaround, we can move the 'imm64' case inside the else block and check for the type there, which also catches unhandled types at compile time.

GCC evaluated the always failing assert before the constexprs leading
to it, resulting in a compilation failure. As a workaround, we can move
the 'imm64' case inside the else block and check for the type there,
which also catches unhandled types at compile time.
@LukeUsher LukeUsher merged commit e2bf15a into ares-emulator:master Sep 15, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants