From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 218D81F487 for ; Sun, 29 Mar 2020 21:59:33 +0000 (UTC) Received: from localhost ([::1]:42040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIfxr-0002Qq-P3 for normalperson@yhbt.net; Sun, 29 Mar 2020 17:59:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54784) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIfxn-0002Qg-9y for bug-gnulib@gnu.org; Sun, 29 Mar 2020 17:59:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIfxm-0006JW-6T for bug-gnulib@gnu.org; Sun, 29 Mar 2020 17:59:27 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::10]:13294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jIfxl-0006FB-Ez for bug-gnulib@gnu.org; Sun, 29 Mar 2020 17:59:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1585519162; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=9xUD6JyWmrd/Zlx+Af0pMt1zBCAkOxibrzbCKe3mL3k=; b=bb9EbSL1nznCIvna38k7FJNTWvKSRwK4Hu3tINCl7hgBaxAKQdWty7E90TpiHSinzb lWwAi/EU638V24v2VrWn6VlZooqjHK2zJQnt12NjruijcxUMIE7I7wDwJVpoEGb82TSm 1fJLJ7sPpJrgowd/DPFtBTWVKFPljAozavDjYDZ36PsHw6YVtUr1Lbs7qm0YjT9PgRep 13Mg1cO2KbXq/gPwfTw+/r1kAqsA/bW0eH3X6WNpN77ojzpvK6MqZZv+sUvvPd1BhzKy A0sDqz/7pQT5YM+c5u779kWT3+OpKozPJce7ApbKKrkMzuHzM8dNNLl1UVOEvb1o9xdA X2FQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.2.1 DYNA|AUTH) with ESMTPSA id D01ccaw2TLxLBPK (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 29 Mar 2020 23:59:21 +0200 (CEST) From: Bruno Haible To: noloader@gmail.com Subject: Re: test-math.c:89:3: runtime error: division by zero Date: Sun, 29 Mar 2020 23:59:20 +0200 Message-ID: <1665625.n3MASsG4Sn@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-174-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1848192.VuvhVD494M@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::10 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Jeffrey Walton wrote: > Let's see what the GCC folks recommend: "GCC and division by 0 under > sanitizers", https://gcc.gnu.org/pipermail/gcc-help/2020-March/138746.html. The way I interpret their answer https://gcc.gnu.org/pipermail/gcc-help/2020-March/138747.html is: 1) You need to distinguish integer division by zero and floating-point division by zero. 2) For floating-point division by zero GCC warns but should not warn. You should enter a bug report about this. 3) The undefined-behaviour sanitizer should report integer division by zero but not floating-point division by zero ("as it can be a legitimate way of obtaining infinities and NaNs"). In the gnulib code, test-math.c:89, we clearly have a floating-point division by zero. Bruno