Skip to content

Commit 378b79b

Browse files
committed
Ignore -Warray-bounds compiler warning in JIT
The out-of-bounds pointer is intentional.
1 parent 9fadf6d commit 378b79b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/opcache/jit/dynasm/dasm_x86.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ void dasm_free(Dst_DECL)
124124
void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl)
125125
{
126126
dasm_State *D = Dst_REF;
127+
#ifdef __GNUC__
128+
# pragma GCC diagnostic push
129+
# pragma GCC diagnostic ignored "-Warray-bounds"
130+
#endif
127131
D->globals = gl - 10; /* Negative bias to compensate for locals. */
132+
#ifdef __GNUC__
133+
# pragma GCC diagnostic pop
134+
#endif
128135
DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int));
129136
}
130137

0 commit comments

Comments
 (0)