Skip to content

Fix build: unknown_instruction reads ppc_state before it is declared - #3

Open
dougchansan wants to merge 1 commit into
ExpansionPak:moderngekko-vendorfrom
dougchansan:fix-interpreter-build
Open

Fix build: unknown_instruction reads ppc_state before it is declared#3
dougchansan wants to merge 1 commit into
ExpansionPak:moderngekko-vendorfrom
dougchansan:fix-interpreter-build

Conversation

@dougchansan

@dougchansan dougchansan commented Aug 4, 2026

Copy link
Copy Markdown

moderngekko-vendor does not currently compile. The staticrecomp diagnostic block added to Interpreter::unknown_instruction sits above the const auto& ppc_state declaration it reads, and the file never includes StaticRecompCore.h for g_static_recomp_core:

Interpreter.cpp:304:20: error: use of undeclared identifier 'ppc_state'
Interpreter.cpp:297:7:  error: use of undeclared identifier 'g_static_recomp_core'

20 errors, so anyone cloning the branch today cannot build it.

This hoists the existing declaration above the new block rather than adding a second one, and adds the missing include. No behaviour change.

Sending this on its own and first, ahead of the rest of the series, since it blocks everything else.

Performance impact

None. unknown_instruction runs only when the interpreter meets an opcode it cannot decode, which does not happen in normal execution. This is a build fix.

moderngekko-vendor does not compile. The staticrecomp diagnostic block added to
Interpreter::unknown_instruction sits above the `const auto& ppc_state`
declaration it reads, and the file never includes StaticRecompCore.h for
g_static_recomp_core, so the branch fails with 20 errors:

    Interpreter.cpp:304:20: error: use of undeclared identifier 'ppc_state'
    Interpreter.cpp:297:7:  error: use of undeclared identifier 'g_static_recomp_core'

Hoist the existing declaration above the new block rather than adding a second
one, and add the missing include. No behaviour change.
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.

1 participant