From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.lisp.guile.user Subject: Re: Silencing compilation warnings when calling compiler explicitly Date: Wed, 10 Aug 2022 16:46:33 +0200 Message-ID: References: <22174a8e-e241-f2a6-b4da-1943fec989b6@abou-samra.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12771"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Aug 10 16:47:33 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLmzc-0003C5-VJ for guile-user@m.gmane-mx.org; Wed, 10 Aug 2022 16:47:32 +0200 Original-Received: from localhost ([::1]:35910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLmzb-0002OD-N0 for guile-user@m.gmane-mx.org; Wed, 10 Aug 2022 10:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLmyk-0002Nk-Iy for guile-user@gnu.org; Wed, 10 Aug 2022 10:46:38 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:54779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLmyj-0003Nn-20 for guile-user@gnu.org; Wed, 10 Aug 2022 10:46:38 -0400 Original-Received: from [192.168.1.46] ([82.65.251.18]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.184]) with ESMTPSA (Nemesis) id 1M9ntb-1oIEDG02Oz-005qQw for ; Wed, 10 Aug 2022 16:46:35 +0200 Content-Language: en-US In-Reply-To: <22174a8e-e241-f2a6-b4da-1943fec989b6@abou-samra.fr> X-Provags-ID: V03:K1:fnriwlu+hWQCLcwOF3MVdW2jPkde1H8Bz8/6gptkymwb8BURfSs 6kcsa/TCpd5rB9agPCIIj3HQT4iA1L9T+S8vng9WS3T3lYneLGQ2t056hMTT3KRubWCUgHf qxp8BTcLPjFnAKrMly6MNucaG/Av6pWO/Q66w1UJtyA0Lg1w5MraGV3HHuUVX/s3o3esgCD lxwGsIsX6sgXplhRLj2KA== X-UI-Out-Filterresults: notjunk:1;V03:K0:yJdSAXFesMM=:3AhJbLLM96/WaHuzU8CyKb kb/MMHF77IUCEWLEDF+iJvPWr73AeBAtLMfx0QdLVGEycULm8wHX+zc+Uu9PomXyE73ZasEMD JJokcYF+VVvdEDbG2Zrfu8j1PFgD0qCXUg+xHCfMwTZaSW+Wk77YaDfD8l5zb4YQWrAQrSAqL pyl0RnBs3Lms1+n3JmD1Ubtq12y8MY809UXsoVRuiFUJE3AwS37v30KeBgH8R76Vqhy1PAX30 DrJTtavkM3GgFwnYyL2p2Mx0E/CgkX1obd0s4r08xFtO5knCcbY0miSkgxWy2CleaUs2oIRIr PC7wxLnPmH78AyTWQ18FrUZtTn3pbaChifajxBMgj0l9L0WedX0W8j50WDz70u/NrzfWR6xDD bLF2Ixs0XJzvExbethvuWJm1AYgs7c6DFr7Il9uYuqT1AVke8Qex5bpqFyLGbzv+uVr4DMEZ+ mbUZMIIxNlk95M4x4KdxT1Kl6jKPqSxvUAB6diwl3cpmVurAy2DZUoRYyAwn+p07fKivyGWVu fjg6mBahsck0QxW0ZeTYhhMmSMIJjU3B13gdQ+p6SjpQ3dmrOSvNgh7fr3BXl+80a4mB8UMmJ t7Lw6wwmKd0B7O6VbYwsjik5lRxYT+rRBi+UCbPn8WLXH9qSxNIGj3kqUSm8RrlrYFmI3v6F5 RWSwm92Q6OIcVYpmrlSKim7c6Mkbl0OUrlCJU+Lzfy2l7qqWZlUlrj6UhizfCWnMUTgXPjvtO ey1COtvoC0seVnJPb60gdWUTpOOtnhCuuh8r9w== Received-SPF: none client-ip=212.227.17.13; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18515 Archived-At: Le 10/08/2022 à 16:42, Jean Abou Samra a écrit : > Hi, > > I'm wondering if there is a simple way to shut up warnings emitted > when calling compile in Guile 2.2. For example: > > (use-modules (system base compile)) > > (display >  (compile '(lambda (x) >              (case x >                ((5 5) 5) >                ((6) 6))) >           #:env (current-module) >           #:opts '(#:warnings ()))) > > > From the code of compile in module/system/base/compile.scm (when > checking out the v2.2.7 tag in the repository), it seems that > the use of #:warning () in opts should turn off warnings, but > this seems not to be the case, as the output is > > ;;; : warning: duplicate datum 5 in clause ((5 5) 5) > of case expression (case x ((5 5) 5) ((6) 6)) > # > > > So far, I've found > > > (use-modules (system base compile)) > > (define (make-null-port) >   (make-soft-port >    (vector >     (lambda _ #f) ; output 1 char >     (lambda _ #f) ; output string >     (lambda () #f) ; flush output >     #f ; get char >     (lambda () #f) ; close >     ) >    "w")) Ah, of course, less than a minute after I sent my message, I found %make-void-port... Still, is there a better way than playing with the port? I assume I am doing something wrong, as I would expect #:warning () to work.