]> Nishi Git Mirror - gwion.git/commitdiff
:art: Add -Wno-pedantic
authorJérémie Astor <fennecdjay@gmail.com>
Tue, 6 Apr 2021 12:17:37 +0000 (14:17 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Tue, 6 Apr 2021 12:17:37 +0000 (14:17 +0200)
Makefile
src/lib/prim.c

index 8385c170e44b246f7b218b43e263a9129eccdce2..7c6a5047caa09a13f20c0818d8a48a26240929fa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,9 @@ GWLIBS := lib${PRG}.a libcmdapp/libcmdapp.a ast/libgwion_ast.a
 GWLIBS += util/libgwion_util.a ast/libprettyerr/libprettyerr.a util/libtermcolor/libtermcolor.a
 _LDFLAGS = ${GWLIBS} ${LDFLAGS}
 
+# we are not pedantic
+CFLAGS += -Wno-pedantic
+
 all: options-show ${_GWLIBS} src/main.o
        @$(info link ${PRG})
        @${CC} src/main.o -o ${PRG} ${_LDFLAGS} ${LIBS}
index 2b8410cc0fa40eb0108cd04d8ca2ca994ff9a8a4..370876841c11625f97518ce380ba4e0da738d503 100644 (file)
@@ -387,6 +387,10 @@ static GWION_IMPORT(dur) {
   GWI_BB(gwi_oper_ini(gwi, "dur", "float", "dur"))
   GWI_BB(gwi_oper_end(gwi, "/",       FloatDivide))
 
+  GWI_BB(gwi_oper_ini(gwi, "float", "dur", "dur"))
+  CHECK_FF("*=>", rassign, r_mul)
+  CHECK_FF("/=>", rassign, r_div)
+
   GWI_BB(gwi_oper_ini(gwi, "dur", "dur", "int"))
   GWI_BB(gwi_oper_end(gwi, ">",           float_gt))
   GWI_BB(gwi_oper_end(gwi, ">=",           float_ge))
@@ -419,6 +423,9 @@ static GWION_IMPORT(time) {
   GWI_BB(gwi_oper_end(gwi, "/",         FloatDivide))
   GWI_BB(gwi_oper_ini(gwi, "time", "time", "dur"))
   GWI_BB(gwi_oper_end(gwi, "-",         FloatMinus))
+  GWI_BB(gwi_oper_ini(gwi, "float", "time", "time"))
+  CHECK_FF("*=>", rassign, r_mul)
+  CHECK_FF("/=>", rassign, r_div)
   GWI_BB(gwi_oper_ini(gwi, "dur", "time", "time"))
   CHECK_FF("=>", rassign, r_assign)
   GWI_BB(gwi_oper_end(gwi, "+",         FloatPlus))
@@ -431,7 +438,6 @@ static GWION_IMPORT(time) {
   return gwi_oper_end(gwi, "<=",           float_le);
 }
 
-
 #define BINARY_FLOAT_FOLD(name, TYPE, OP, pre, post) \
   BINARY_FOLD(float, name, TYPE, OP, pre, post, is_prim_float, is_prim_float, m_float, ae_prim_float, fnum, fnum, fnum)