Ignore -Warray-bounds compiler warning in JIT

The out-of-bounds pointer is intentional.
This commit is contained in:
Ilija Tovilo 2023-03-05 18:50:28 +01:00
parent 9fadf6d96b
commit 378b79b90c
No known key found for this signature in database
GPG key ID: A4F5D403F118200A

View file

@ -124,7 +124,14 @@ void dasm_free(Dst_DECL)
void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl)
{ {
dasm_State *D = Dst_REF; dasm_State *D = Dst_REF;
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif
D->globals = gl - 10; /* Negative bias to compensate for locals. */ D->globals = gl - 10; /* Negative bias to compensate for locals. */
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int));
} }