DRAFT mescc: Hide assign size ERROR as WARNING behind MESCC_DEBUG.

* module/mescc/compile.scm (expr->register): Only output inexplicable
size warning when MESCC_DEBUG environment variable is set.
This commit is contained in:
Janneke Nieuwenhuizen 2023-11-05 10:20:46 +01:00
parent 607f86247d
commit 6f5aeed75a

View file

@ -1406,8 +1406,9 @@
(= size-b reg-size)))
(not (and (= size reg-size)
(or (= size-b 1) (= size-b 2) (= size-b 4)))))
(format (current-error-port) "ERROR assign: ~a" (with-output-to-string (lambda () (pretty-print-c99 o))))
(format (current-error-port) " size[~a]:~a != size[~a]:~a\n" rank size rank-b size-b))
(when (getenv ("MESCC_DEBUG"))
(format (current-error-port) "WARNING assign: ~a" (with-output-to-string (lambda () (pretty-print-c99 o))))
(format (current-error-port) " size[~a]:~a != size[~a]:~a\n" rank size rank-b size-b)))
(pmatch a
((p-expr (ident ,name))
(if (or (<= size r-size)