From owner-freebsd-toolchain@freebsd.org Mon Mar 14 20:30:29 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0363AD0876 for ; Mon, 14 Mar 2016 20:30:29 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AB3F4F7; Mon, 14 Mar 2016 20:30:29 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id u2EKUNOH034962 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 14 Mar 2016 13:30:23 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id u2EKUN50034961; Mon, 14 Mar 2016 13:30:23 -0700 (PDT) (envelope-from sgk) Date: Mon, 14 Mar 2016 13:30:23 -0700 From: Steve Kargl To: Dimitry Andric Cc: freebsd-toolchain@freebsd.org Subject: Re: clang gets numerical underflow wrong, please fix. Message-ID: <20160314203023.GA34638@troutmask.apl.washington.edu> References: <20160313182521.GA25361@troutmask.apl.washington.edu> <74970883-FE44-47C0-BDA0-92DB0723398A@FreeBSD.org> <20160313201004.GA26343@troutmask.apl.washington.edu> <20160314015311.GA28237@troutmask.apl.washington.edu> <65DA5D5E-6BEE-4522-9478-B659724F9CDC@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65DA5D5E-6BEE-4522-9478-B659724F9CDC@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 20:30:29 -0000 On Mon, Mar 14, 2016 at 08:23:33PM +0100, Dimitry Andric wrote: > > Maybe this is a usable workaround for libm. > Thanks for looking into this. I just read the audit trail at llvm.org. Searching the clang user manual turns up The support for standard C in clang is feature-complete except for the C99 floating-point pragmas. There is no other statement concerning the implementation defined behavior. The understated assumption that FENV_ACCESS is tacitly set to OFF should be documented. It won't help possible libm issues. The libm function is trying to raise the FE_UNDERFLOW signal and return 0 to a program. As it is now, the libm function returns a nonzero invalid result. -- Steve