guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silencing compilation warnings when calling compiler explicitly


From: Jean Abou Samra
Subject: Re: Silencing compilation warnings when calling compiler explicitly
Date: Wed, 10 Aug 2022 18:14:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0



Le 10/08/2022 à 18:05, Jean Abou Samra a écrit :
Le 10/08/2022 à 16:42, Jean Abou Samra a écrit :
I know that in Guile 3.0 I can do #:warning-level 0,
and it works,

Correction: no, it does not work (not sure why I thought that).


$ cat x.scm
(use-modules (system base compile))

(display
 (compile '(lambda (x)
             (case x
               ((5 5) 5)
               ((6) 6)))
          #:warning-level 0
          #:env (current-module)))
$ guile3.0 x.scm
[auto-compilation messages snipped]
;;; <unknown-location>: warning: duplicate datum 5 in clause ((5 5) 5) of case expression (case x ((5 5) 5) ((6) 6))
#<procedure 555de3e97468 (x)>


The same problem exists when compiling code with 'guild compile',
which really looks like a bug, so I'm going to report it.

$ cat cased.scm
(case 5
  ((5 5) 5))
$ guild3.0 compile -W0 cased.scm
cased.scm:2:3: warning: duplicate datum 5 in clause ((5 5) 5) of case expression (case 5 ((5 5) 5))
wrote `/[...]/cased.scm.go'






reply via email to

[Prev in Thread] Current Thread [Next in Thread]