Added -Wpointer-arith to CFLAGS, read more

I attempted to add '-Wpedantic' to CFLAGS, but it seems that my usage of
the variable length arrays within unions is causing an error that can't
be selectively disabled:

error: invalid use of structure with flexible array member [-Werror=pedantic]

This is the offending code: /source/toy_string.h#L9-L37

It seems that tagged unions, with VLAs within, is simply not allowed.
Unfortunately, my whole string system depends on it. I'll have to find some way
around it.

I've also updated the debugging output in repl/main.c.
This commit is contained in:
2024-12-12 18:14:08 +11:00
parent cf9affe190
commit 7be63c8ccc
11 changed files with 79 additions and 150 deletions

View File

@@ -1,6 +1,6 @@
#compiler settings
CC=gcc
#CFLAGS+=-std=c17 -g -Wall -Werror -Wextra -Wformat=2
CFLAGS+=-std=c17 -g -Wall -Werror -Wextra -Wpointer-arith -Wformat=2
LIBS+=-lm -lToy
LDFLAGS+=-Wl,-rpath,'$$ORIGIN'