From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106652 invoked by alias); 30 May 2019 21:38:44 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 106643 invoked by uid 89); 30 May 2019 21:38:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*i:sk:ri6muj3, H*f:sk:ri6muj3 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 May 2019 21:38:43 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x4ULceft009439; Thu, 30 May 2019 16:38:40 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x4ULcdBH009438; Thu, 30 May 2019 16:38:39 -0500 Date: Thu, 30 May 2019 21:38:00 -0000 From: Segher Boessenkool To: Martin Jambor Cc: Tejas Joshi , gcc@gcc.gnu.org, hubicka@ucw.cz Subject: Re: About GSOC. Message-ID: <20190530213839.GF31586@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00268.txt.bz2 On Thu, May 30, 2019 at 07:08:45PM +0200, Martin Jambor wrote: > Interesting, I was also puzzled for a moment. But notice that: > > int main () > { > _Float128 x = 18446744073709551617.5f128; > _Float128 y = __builtin_roundf128 (x); > } > > behaves as expected... the difference is of course the suffix pegged to > the literal constant (see > https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Floating-Types.html). > > I would also expect GCC to use a larger type if a constant does not fit > into a double, but apparently that does not happen. I would have to > check but it is probably the right behavior according to the standard. 6.4.4.2/4: "An unsuffixed floating constant has type double." I don't think your suggestion would be okay? Segher