force c89 pedantic compilation mode

This commit is contained in:
2025-08-21 18:15:48 +03:00
committed by Pavel Kulyov
parent 63918d23c0
commit d5e443a72c
2 changed files with 13 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
(declare (unit sexc)
(uses fmt-c
sex-macros
sex-modules))
sex-modules
sex-types))
(include "utils.macros.scm")
@@ -44,6 +45,10 @@
((@) 'vector-ref)
((include) '%include)
((cast) '%cast)
;; uh things we do for c89 compatibility
((bool) 'int)
((true) 1)
((false) 0)
(else
(if (symbol? atom)
(unkebabify atom)
@@ -288,7 +293,7 @@
(emit-c sex-forms)))
(call-with-values
(lambda ()
(process compiler (append (list temp-c-out "-o" out-file)
(process compiler (append (list temp-c-out "-o" out-file "-std=c89" "-pedantic")
(if (get-arg args 'compile-object #f)
(list "-c")
(list))