diff options
author | Damien George <damien@micropython.org> | 2022-03-31 10:57:34 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-03-31 10:59:55 +1100 |
commit | bb70874111dbb246624a68c013e8f1c3245ca0d8 (patch) | |
tree | 5189185d865dcce299aeb39de88b5285432175c4 /tests/basics/string_startswith_upy.py.exp | |
parent | 7e8222ae063d78ae8f901bb0f9fef663edd2edb6 (diff) | |
download | micropython-bb70874111dbb246624a68c013e8f1c3245ca0d8.tar.gz micropython-bb70874111dbb246624a68c013e8f1c3245ca0d8.zip |
py/vm: Prevent array bound warning when using -MP_OBJ_ITER_BUF_NSLOTS.
This warning can happen on clang 13.0.1 building mpy-cross:
../py/vm.c:748:25: error: array index -3 refers past the last possible
element for an array in 64-bit address space containing 64-bit (8-byte)
elements (max possible 2305843009213693952 elements)
[-Werror,-Warray-bounds]
sp[-MP_OBJ_ITER_BUF_NSLOTS + 1] = MP_OBJ_NULL;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using pointer access instead of array access works around this warning.
Fixes issue #8467.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/basics/string_startswith_upy.py.exp')
0 files changed, 0 insertions, 0 deletions