Skip to content

Commit

Permalink
Windows: Fix GCC -fpermissive error with 'pck' section workaround
Browse files Browse the repository at this point in the history
Follow-up to godotengine#57450.
  • Loading branch information
akien-mga committed Feb 1, 2022
1 parent a1469bf commit 5a1f42b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/windows/godot_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#ifndef TOOLS_ENABLED
#if defined _MSC_VER
#pragma section("pck", read)
__declspec(allocate("pck")) static char dummy[8] = { 0 };
__declspec(allocate("pck")) static const char dummy[8] = { 0 };
#elif defined __GNUC__
static const char dummy[8] __attribute__((section("pck"), used)) = { 0 };
#endif
Expand Down Expand Up @@ -142,7 +142,7 @@ int widechar_main(int argc, wchar_t **argv) {

#ifndef TOOLS_ENABLED
// Workaround to prevent LTCG (MSVC LTO) from removing "pck" section
char *dummy_guard = dummy;
const char *dummy_guard = dummy;
#endif

char **argv_utf8 = new char *[argc];
Expand Down

0 comments on commit 5a1f42b

Please sign in to comment.