From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6081 invoked by alias); 22 Aug 2014 20:16:00 -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 6063 invoked by uid 89); 22 Aug 2014 20:15:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Aug 2014 20:15:58 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XKvFZ-0000l7-C6 from joseph_myers@mentor.com ; Fri, 22 Aug 2014 13:15:53 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 22 Aug 2014 13:15:53 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 22 Aug 2014 21:15:51 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1XKvFV-0004oA-Nx; Fri, 22 Aug 2014 20:15:49 +0000 Date: Fri, 22 Aug 2014 20:16:00 -0000 From: "Joseph S. Myers" To: DJ Delorie CC: , Subject: Re: __intN patch 3/5: main __int128 -> __intN conversion. In-Reply-To: <201408221924.s7MJOcjB022631@greed.delorie.com> Message-ID: References: <201408132211.s7DMBGBu016387@greed.delorie.com> <201408212123.s7LLNPIQ018746@greed.delorie.com> <201408220515.s7M5Fhpa007479@greed.delorie.com> <201408221924.s7MJOcjB022631@greed.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-08/txt/msg02223.txt.bz2 On Fri, 22 Aug 2014, DJ Delorie wrote: > > > > Maybe you need to refactor __glibcxx_digits so there is a version taking > > > > the bitsize as an argument rather than using sizeof(T) * __CHAR_BIT__, but > > > > that should be the only change needed to handle such types with the > > > > existing macros. The bitsize macros should be the only ones needing > > > > predefining to pass information to libstdc++. > > > > > > Like this? > > > > Yes (well, the libstdc++ changes will need to go to the libstdc++ mailing > > list for review there, but this is the sort of thing I'd expect to keep > > the way libstdc++ defines these limits as consistent as possible between > > different types). > > Ok, here's the updated c-cppbuiltins.c and all the libstdc++-v3 > changes, cross-posted to the libstdc++ list. I tested the macros on > x86-64 (before and after) and msp430 (after) with __int128 and __int20 > and get the right values in all cases. I'd like to see the updated version of the whole of patch 3 (tested to be actually independent of the other patches) for review, though I won't be reviewing the C++ parts. > + if (!flag_iso || int_n_data[i].bitsize == POINTER_SIZE) I don't see flag_iso as relevant here (since the macros are in the implementation namespace). The definitions could reasonably be restricted to c_dialect_cxx (), though, given that they are specifically for use by libstdc++ (and it's easier to add a macro later for C if needed, than to remove one after adding it). -- Joseph S. Myers joseph@codesourcery.com