I am using Windows 10 (21H2 19044.1387 , latest and patched as of 3-Dec-2021) and MSYS2 x64 using the latest (GCC 11.2.0) and WxWidget 3.1.5 (built with same MSYS2 GCC 11.2.0). I do not get the error/warning.
The command I use to build C::B (via a batch file that configures the parameters) is:
RUNNING: ""C:\Program Files\CodeBlocks\codeblocks.exe" --no-dde --multiple-instance --verbose --log-to-file --no-batch-window-close --target=All --build "D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\CodeBlocks_wx31_64 - no Fortran.workspace""
The workspace has the "plugins/contrib/FortranProject/FortranProject_cbsvn_wx31_64.cbp" project removed as I used to get the src from GIT and as such did not include the fortran src.
Attached is the full build log.
The relevant lines from the log are (I have added extra lines to make it easier to read):
-------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler)---------------
Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h
g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\include\sdk_precomp.h -o .objs31_64\include\sdk_precomp.h.gch
g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\configmanager-revision.cpp -o .objs31_64\sdk\configmanager-revision.o
g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\annoyingdialog.cpp -o .objs31_64\sdk\annoyingdialog.o
g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\autodetectcompilers.cpp -o .objs31_64\sdk\autodetectcompilers.o
g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\base64.cpp -o .objs31_64\sdk\base64.o
GCC version info:C:\msys64\mingw64\bin\gcc.exe --version
gcc (Rev2, Built by MSYS2 project) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.