-
Notifications
You must be signed in to change notification settings - Fork 958
Closed
Description
When compiling for an arm 32bit (armhf) target, ./configure
yields this error:
checking for unaligned access to int... ccan/tools/configurator/configurator: Test for HAVE_UNALIGNED_ACCESS did not compile:
configuratortest.c: In function 'main':
configuratortest.c:8:22: error: array subscript 'int[0]' is partly outside array bounds of 'char[4]' [-Werror=array-bounds]
8 | return *x == *y;
| ^~
configuratortest.c:5:11: note: at offset 1 into object 'pad' of size 4
5 | char pad[sizeof(int *) * 1];
| ^~~
cc1: all warnings being treated as errors
This only happens when using the -O2
flag and above. -O1
compiles fine.
to reproduce, you can use a cross compiler (GCC) and these flags: "-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
Metadata
Metadata
Assignees
Labels
No labels