From 8210378510b92f8ec224c6adcda3ecc77625f1a0 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 15 Apr 2025 17:18:18 +0200 Subject: arith: Don't use C23 features --- ox-arrays.cabal | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ox-arrays.cabal') diff --git a/ox-arrays.cabal b/ox-arrays.cabal index ecd3ba7..39a2782 100644 --- a/ox-arrays.cabal +++ b/ox-arrays.cabal @@ -27,6 +27,13 @@ flag nonportable-simd default: False manual: True +flag pedantic-c-warnings + description: + Compile embedded C code with a high warning level. Only useful for + ox-arrays developers. + default: False + manual: True + library exposed-modules: Data.Array.Mixed.Internal.Arith @@ -82,7 +89,9 @@ library strided-array-ops hs-source-dirs: ops c-sources: cbits/arith.c - cc-options: -O3 -Wall -Wextra -std=c99 + cc-options: -O3 -std=c11 + if flag(pedantic-c-warnings) + cc-options: -Wall -Wextra -pedantic if flag(nonportable-simd) cc-options: -march=native elif arch(x86_64) || arch(i386) -- cgit v1.2.3-70-g09d2