Commit d88716c

kravantokh <kravantokh@noreply.codeberg.org>
2026-08-22 19:17:41
Disable strict aliasing for now.
1 parent ff01629
Changed files (2)
testing/tests/015_array_basic.c
@@ -13,6 +13,7 @@ void entry(void) {
 
 	/* Not much to assert here, since the heap may allocate more than asked for */
 
+	assert( a->len == 16 );
 	/* Truncate by cutting 16 elements off the end - this preserves allocation size, only changes logical length */
 	usizes_truncate( a, 16 );
 	assert( a->len == 0 );
testing/test.sh
@@ -3,7 +3,7 @@
 rm -rf ./build/tests/*
 mkdir -p ./build/tests
 
-CFLAGS=(-nostdlib -ffreestanding -I. -DNOTLIBC_IMPLEMENT -DNOTLIBC_SILENCE -fno-builtin -g -Wall -Wextra -Wpedantic -Werror)
+CFLAGS=(-nostdlib -ffreestanding -I. -DNOTLIBC_IMPLEMENT -DNOTLIBC_SILENCE -fno-builtin -g -Wall -Wextra -Wpedantic -Werror -fno-strict-aliasing)
 pids=()
 
 ensure () {
@@ -40,9 +40,11 @@ build () {
 	local out="./build/tests/$filename"
 
 
+	local cmd="$2 ${flags[@]} $1 -o $out"
 	echo "Building $filename."
+	echo "	$cmd"
 
-	if ! $2 ${flags[@]} $1 -o "$out"; then
+	if ! $cmd; then
 		echo "Build failed for $out."
 		exit 1
 	fi