From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31814 invoked by alias); 7 Nov 2013 21:40:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31805 invoked by uid 89); 7 Nov 2013 21:40:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPAM_SUBJECT,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Nov 2013 21:40:28 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VeXJF-0003Is-9T from joseph_myers@mentor.com ; Thu, 07 Nov 2013 13:40:13 -0800 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 7 Nov 2013 13:40:13 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.2.247.3; Thu, 7 Nov 2013 21:40:11 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1VeXJB-0004ob-PD; Thu, 07 Nov 2013 21:40:09 +0000 Date: Thu, 07 Nov 2013 22:43:00 -0000 From: "Joseph S. Myers" To: Uros Bizjak CC: "gcc-patches@gcc.gnu.org" Subject: Re: Implement C11 _Atomic In-Reply-To: Message-ID: References: <20131107164555.GI27813@tucnak.zalov.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-11/txt/msg00843.txt.bz2 On Thu, 7 Nov 2013, Uros Bizjak wrote: > However, this insn also raised FE_INEXACT flag (also on x86_64), > probably not what you wanted. Your code that generates FE_UNDERFLOW > will also raise FE_INEXACT. (and FE_DENORMAL). If the compound assignment raised overflow or underflow, it will also have raised inexact, so it's not a problem that this code raises inexact along with overflow/underflow (and then raises it again - ISO C expressly "does not require support for trap handlers that maintain information about the order or count of floating-point exceptions"). I raised the case of exact underflow in , but it's a matter to be dealt with when standard C gets bindings for non-default exception handling (probably in TS 18661-5, not yet written) rather than now. If GCC were to implement such bindings, the issues with delayed x87 exceptions might also need addressing for them - but given the lack of support for exceptions and rounding modes following C99/C11 Annex F, I don't really expect support for new bindings for exceptions and rounding modes any time soon. (Separately, C99/C11 also leave it implementation-defined whether feraiseexcept raises inexact along with overflow and underflow - but here we're dealing with exceptions we know came from floating-point arithmetic, rather than an arbitrary user-specified argument to feraiseexcept.) -- Joseph S. Myers joseph@codesourcery.com