Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
msys2-w32api-headers: work around
__buildreadseg
errors
In msys2/msys2-runtime@ae5462a53b (CI: fix the build with gcc 13, 2023-11-10), we worked around build errors that look like this: In member function ‘virtual ssize_t fhandler_console::write(const void*, size_t)’: cc1plus: note: source object is likely at address zero In function ‘long long unsigned int __readgsqword(unsigned int)’, inlined from ‘_TEB* NtCurrentTeb()’ at /usr/include/w32api/winnt.h:10013:86, inlined from ‘tmp_pathbuf::~tmp_pathbuf()’ at winsup/cygwin/local_includes/tls_pbuf.h:21:5, inlined from ‘virtual ssize_t fhandler_console::write(const void*, size_t)’ at winsup/cygwin/fhandler/console.cc:4047:1: /usr/include/w32api/psdk_inc/intrin-impl.h:838:1: warning: array subscript 0 is outside array bounds of ‘long long unsig ned int [0]’ [-Warray-bounds=] 838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q") | ^~~~~~~~~~~~~~ This happens since the recent upgrade in MSYS2 from GCC 11.3.0-4 -> 13.2.0-2. The work-around was to add the big hammer `-Wno-error`, which was later toned down to `-Wno-error=array-bounds`, among other more surgical options, in msys2/msys2-runtime@76fd7eae5a (fixup! CI: fix the build with gcc 13, 2023-12-22). Helpfully, a work-around for the actual compile error was proposed in https://sourceforge.net/p/mingw-w64/mailman/message/37674508/ on the mingw-w64-public mailing list. Let's use that for now. Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information