Fix build: unknown_instruction reads ppc_state before it is declared - #3
Open
dougchansan wants to merge 1 commit into
Open
Fix build: unknown_instruction reads ppc_state before it is declared#3dougchansan wants to merge 1 commit into
dougchansan wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
moderngekko-vendordoes not currently compile. The staticrecomp diagnostic block added toInterpreter::unknown_instructionsits above theconst auto& ppc_statedeclaration it reads, and the file never includesStaticRecompCore.hforg_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_instructionruns only when the interpreter meets an opcode it cannot decode, which does not happen in normal execution. This is a build fix.