You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source: master (8311518)
Host: Win64 (cygwin64)
Compiler: gcc (13.3.1 or 12.4.0-3)
w32api-headers version: 12.0.0-1
Not reproduced on clang.
How to reproduce: gcc -I include -O2 -Wall -Wextra -Wpedantic -c misc.c
Output (of gcc):
In file included from /usr/include/w32api/winnt.h:27,
from /usr/include/w32api/minwindef.h:163,
from /usr/include/w32api/windef.h:9,
from /usr/include/w32api/windows.h:69,
from include/private/gc_priv.h:295,
from os_dep.c:18:
In function '__readgsqword',
inlined from 'NtCurrentTeb' at /usr/include/w32api/winnt.h:10020:73,
inlined from 'GC_get_stack_base' at os_dep.c:763:29:
/usr/include/w32api/psdk_inc/intrin-impl.h:838:1: warning: array subscript 0 is outside array bounds of 'long long unsigned int[0]' [-Warray-bounds=]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function 'GC_get_stack_base':
cc1: note: source object is likely at address zero
In function '__readgsqword',
inlined from 'NtCurrentTeb' at /usr/include/w32api/winnt.h:10020:73,
inlined from 'GC_get_stack_base' at os_dep.c:763:29,
inlined from 'GC_get_main_stack_base' at os_dep.c:1640:7:
/usr/include/w32api/psdk_inc/intrin-impl.h:838:1: warning: array subscript 0 is outside array bounds of 'long long unsigned int[0]' [-Warray-bounds=]
838 | __buildreadseg(__readgsqword, unsigned __int64, "gs", "q")
| ^~~~~~~~~~~~~~
In function 'GC_get_main_stack_base':
cc1: note: source object is likely at address zero
The text was updated successfully, but these errors were encountered:
ivmai
changed the title
Array subscript 0 is outside array bounds gcc warning in NtCurrentTeb on Cygwin
Array subscript 0 is outside bounds gcc warning in NtCurrentTeb on Cygwin
Oct 13, 2024
Source: master (8311518)
Host: Win64 (cygwin64)
Compiler: gcc (13.3.1 or 12.4.0-3)
w32api-headers version: 12.0.0-1
Not reproduced on clang.
How to reproduce:
gcc -I include -O2 -Wall -Wextra -Wpedantic -c misc.c
Output (of gcc):
The text was updated successfully, but these errors were encountered: