mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
Cygwin: Suppress array-bounds warning from NtCurrentTeb()
This disables a warning seen with gcc 12 caused by intrinsics used by the inline implementation of NtCurrentTeb() inside w32api headers. > In function ‘long long unsigned int __readgsqword(unsigned int)’, > inlined from ‘_TEB* NtCurrentTeb()’ at /usr/include/w32api/winnt.h:10020:86, > [...] > /usr/include/w32api/psdk_inc/intrin-impl.h:838:1: error: array subscript 0 is outside array bounds of ‘long long unsigned int [0]’ [-Werror=array-bounds] See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523#c6 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
a6ffd8301b
commit
4f8668a5b9
@ -53,7 +53,10 @@ details. */
|
|||||||
#define __undef_CRITICAL
|
#define __undef_CRITICAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
#include <lmcons.h>
|
#include <lmcons.h>
|
||||||
#include <ntdef.h>
|
#include <ntdef.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user