Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 58643 invoked from network); 17 Oct 2006 09:02:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2006 09:02:35 -0000 Received: (qmail 69675 invoked by uid 500); 17 Oct 2006 09:02:31 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 69484 invoked by uid 500); 17 Oct 2006 09:02:31 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 69473 invoked by uid 99); 17 Oct 2006 09:02:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 02:02:30 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcjhd-harmony-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 02:02:29 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GZkpr-0002V3-2p for harmony-dev@incubator.apache.org; Tue, 17 Oct 2006 11:02:07 +0200 Received: from iswfwpr01.isw.intel.com ([192.55.37.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Oct 2006 11:02:07 +0200 Received: from alex.astapchuk by iswfwpr01.isw.intel.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Oct 2006 11:02:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: harmony-dev@incubator.apache.org From: Alex Astapchuk Subject: Re: [drlvm] why not use a defined constant for max int? Date: Tue, 17 Oct 2006 16:01:36 +0700 Lines: 44 Message-ID: References: <4533F84D.9070607@pobox.com> <12385bbd0610161603h57afc3dfk78bac4273e9e9a43@mail.gmail.com> <453416A3.5070505@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: iswfwpr01.isw.intel.com User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) In-Reply-To: <453416A3.5070505@pobox.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Geir Magnusson Jr. wrote: > stdint.h It's part of C99, not C++. #7.18.2 of C99 states about INTn_MAX: 'C++ implementations should define these macros only when _ _STDC_LIMIT_MACROS is defined before is included.' (MSVC does not have such file at all.) For C++, the (limits.h) is applicable with INT_MAX or a hand-made constant to address specifically 32 bits. Just my $.02 -- Thanks, Alex > > Ivan Volosyuk wrote: >> On 10/17/06, Geir Magnusson Jr. wrote: >>> When reviewing HARMONY-1672, there are bits like >>> >>> res.i = (int32)2147483647; >>> >>> (not part of the patch, but surrounding code...) >>> >>> What is the downside for using INT32_MAX or something portable and >>> appropriate? Wouldnt' that make the code more readable? >>> >>> geir >> >> It is good to use something like. Is it really portable? I cannot find >> this define in MSVC. >> > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org