Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Fix: GCC warning flags conditional (Clang doesn't support them)

Martin Vogela97bfc684eca
diff --git a/Makefile.cbm b/Makefile.cbm
index 1326f98c9..4d198bf93 100644
--- a/Makefile.cbm
+++ b/Makefile.cbm
@@ -31,9 +31,12 @@ LIBGIT2_FLAGS =
LIBGIT2_LIBS =
endif
+# GCC-specific warning suppressions (Clang doesn't have these flags)
+GCC_NOWARN := $(shell $(CC) -Wno-format-truncation -x c -c /dev/null -o /dev/null 2>/dev/null && echo "-Wno-format-truncation -Wno-restrict -Wno-unused-result")
+
CFLAGS_COMMON = -std=c11 -D_DEFAULT_SOURCE -Wall -Wextra -Werror \
-Wno-unused-parameter -Wno-sign-compare \
- -Wno-format-truncation -Wno-restrict -Wno-unused-result \
+ $(GCC_NOWARN) \
-Isrc -Ivendored -Ivendored/sqlite3 \
-Ivendored/mimalloc/include \
-I$(CBM_DIR) -I$(TS_INCLUDE) \