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
cc -O2 -std=gnu99 -Wall -Werror -Wmissing-prototypes -I/home/afr/clones/vmir -DVMIR_USE_TLSF -I/home/afr/clones/vmir/tlsf -g src/main.c src/vmir.c tlsf/tlsf.c -lm -o vmir
In file included from src/vmir.c:595:
src/vmir_vm.c: In function ‘vm_exec’:
src/vmir_vm.c:1635:7: error: ‘strncat’ accessing between 1 and 4294967295 bytes at offsets [0, 4294967295] and [0, 4294967295] may overlap 1 byte at offset [0, 8589934590] [-Werror=restrict]
strncat(HOSTADDR(R32(1)), HOSTADDR(R32(2)), R32(3));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/vmir_vm.c:1628:7: error: ‘strncpy’ accessing between 0 and 4294967295 bytes at offsets [0, 4294967295] and [0, 4294967295] may overlap up to 4294967295 bytes at offset 4294967294 [-Werror=restrict]
strncpy(HOSTADDR(R32(1)), HOSTADDR(R32(2)), R32(3));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/vmir_vm.c:1621:7: error: ‘strcat’ accessing 1 or more bytes at offsets [0, 4294967295] and [0, 4294967295] may overlap 1 byte at offset [0, 9223372036854775807] [-Werror=restrict]
strcat(HOSTADDR(R32(1)), HOSTADDR(R32(2)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/vmir_vm.c:1614:7: error: ‘strcpy’ accessing 1 byte at offsets [0, 4294967295] and [0, 4294967295] may overlap 1 byte at offset 0 [-Werror=restrict]
strcpy(HOSTADDR(R32(1)), HOSTADDR(R32(2)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:29: vmir] Error 1
GCC version:
$ cc --version
cc (GCC) 8.1.1 20180531
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
When building with clang, it works:
But with gcc, I get errors:
GCC version:
Clang version:
This is on 64-bit Arch Linux.
The text was updated successfully, but these errors were encountered: