type fixes and bindings + notes on subtyping

This commit is contained in:
Ellen Arvidsson 2025-05-19 12:16:31 +02:00
parent 7e3c7c88ea
commit c18f56f7be
28 changed files with 2253 additions and 783 deletions

View file

@ -6,7 +6,8 @@ set(CMAKE_C_STANDARD_REQUIRED True)
string(JOIN " " CMAKE_C_FLAGS
"-Wall -Wextra -Wformat=2"
"-Wconversion -Wsign-conversion -Wimplicit-fallthrough"
"-Werror=implicit -Werror=incompatible-pointer-types"
"-Werror=implicit"
"-Werror=incompatible-pointer-types"
"-Werror=int-conversion")
set(CMAKE_VERBOSE_MAKEFILE ON)
@ -21,17 +22,20 @@ set(SRC_DIR src)
set(SPHO_HEADER_DIR ${INCLUDE_DIR}/spho)
set(SPHO_HEADER
${SPHO_HEADER_DIR}/bind.h
${SPHO_HEADER_DIR}/ctx.h
${SPHO_HEADER_DIR}/err.h
${SPHO_HEADER_DIR}/loc.h
${SPHO_HEADER_DIR}/scope.h
${SPHO_HEADER_DIR}/tp.h
${SPHO_HEADER_DIR}/spho.h
${SPHO_HEADER_DIR}/subt.h
${SPHO_HEADER_DIR}/tp.h
)
set(SPHO_SRC
${SRC_DIR}/spho/bind.c
${SRC_DIR}/spho/ctx.c
${SRC_DIR}/spho/scope.c
${SRC_DIR}/spho/subt.c
${SRC_DIR}/spho/tp.c
)
@ -53,19 +57,18 @@ target_compile_definitions(devcheck PRIVATE
set(MSPH_SRC
${SRC_DIR}/msph/msph.c
${SRC_DIR}/msph/sphophi.c
${SRC_DIR}/msph/token.c
${SRC_DIR}/msph/tree.c
${SRC_DIR}/msph/sphophi.c
${SRC_DIR}/msph/msph.c
)
set(MSPH_HEADER
${INCLUDE_DIR}/msph/token.h
${INCLUDE_DIR}/msph/tree.h
${INCLUDE_DIR}/msph/common.h
${INCLUDE_DIR}/msph/err.h
${INCLUDE_DIR}/msph/decor.h
${INCLUDE_DIR}/msph/sphophi.h
${INCLUDE_DIR}/msph/token.h
${INCLUDE_DIR}/msph/tree.h
)
add_executable(msph ${MSPH_SRC} ${MSPH_HEADER})