From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14894 invoked by alias); 11 Nov 2014 09:23:40 -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 14885 invoked by uid 89); 11 Nov 2014 09:23:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 11 Nov 2014 09:23:39 +0000 Received: from ip-149.net-81-220-91.toulouse.rev.numericable.fr (HELO laptop-mg.local) ([81.220.91.149]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Nov 2014 10:23:35 +0100 Date: Tue, 11 Nov 2014 09:24:00 -0000 From: Marc Glisse Reply-To: gcc-patches@gcc.gnu.org To: Jakub Jelinek cc: Uros Bizjak , "gcc-patches@gcc.gnu.org" , Andrew Pinski , Richard Biener , Trevor Saunders Subject: Re: [PATCH] c++ify sreal In-Reply-To: <20141111081157.GY5026@tucnak.redhat.com> Message-ID: References: <20141111081157.GY5026@tucnak.redhat.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT X-SW-Source: 2014-11/txt/msg00937.txt.bz2 On Tue, 11 Nov 2014, Jakub Jelinek wrote: > On Tue, Nov 11, 2014 at 08:51:41AM +0100, Uros Bizjak wrote: >> Hello! >> >>>>> do $subject, and cleanup for always 64 bit hwi. >>>>> >>>>> >>>>> bootstrapped + regtested x86_64-unknown-linux-gnu, ok? >>>> >>>> Ok. Can you please replace remaining HOST_WIDE_INT >>>> vestiges in there with [u]int64_t please? >>> >>> >>> This patch breaks the build on debian 6.0: >>> >>> ../../gcc/sreal.c: In member function âint64_t sreal::to_int() constâ: >>> ../../gcc/sreal.c:159: error: âINT64_MAXâ was not declared in this scope >> >> Index: system.h >> =================================================================== >> --- system.h (revision 217338) >> +++ system.h (working copy) >> @@ -27,6 +27,7 @@ >> event inttypes.h gets pulled in by another header it is already >> defined. */ >> #define __STDC_FORMAT_MACROS >> +#define __STDC_LIMIT_MACROS >> >> /* We must include stdarg.h before stdio.h. */ >> #include > > Still, I don't believe it will be portable everywhere. > Can't you use > INTTYPE_MAXIMUM (int64_t) instead of INT64_MAX? We already use that > in GCC... We could also start using the standard C++ mechanism (numeric_limits). (nothing wrong with INTTYPE_MAXIMUM, just an alternative) -- Marc Glisse