Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 63504 invoked from network); 17 Oct 2006 09:20:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2006 09:20:45 -0000 Received: (qmail 96392 invoked by uid 500); 17 Oct 2006 09:19:37 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 96348 invoked by uid 500); 17 Oct 2006 09:19:37 -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 96332 invoked by uid 99); 17 Oct 2006 09:19:37 -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:19:37 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mike.fursov@gmail.com designates 64.233.182.190 as permitted sender) Received: from [64.233.182.190] (HELO nf-out-0910.google.com) (64.233.182.190) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 02:19:21 -0700 Received: by nf-out-0910.google.com with SMTP id a4so232408nfc for ; Tue, 17 Oct 2006 02:18:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=qmHG4GbjWHqDTZaayqaLznnsVKY8qPvjHKuA34lF8VuvaXw6dGZmGBTiweBrVA+mlO7jZuJcLX6jfF1Xldm9iOnGv/JudRHynGSm79r8Oc0m0hSIA10HpJiEG8BUKldgD4TSM5wJTNX+yaYJuZbvX/URvZgvzB0F8qLNyHumR8c= Received: by 10.78.185.7 with SMTP id i7mr9023029huf; Tue, 17 Oct 2006 02:18:25 -0700 (PDT) Received: by 10.78.180.1 with HTTP; Tue, 17 Oct 2006 02:18:25 -0700 (PDT) Message-ID: Date: Tue, 17 Oct 2006 16:18:25 +0700 From: "Mikhail Fursov" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] why not use a defined constant for max int? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55965_26925057.1161076705341" References: <4533F84D.9070607@pobox.com> <12385bbd0610161603h57afc3dfk78bac4273e9e9a43@mail.gmail.com> <453416A3.5070505@pobox.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_55965_26925057.1161076705341 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Just my $.02: open/types.h : #define MAX_UINT32 0xffffffff looks like a good place to add MAX_INT32 definition. On 10/17/06, Alex Astapchuk wrote: > > 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 > > -- Mikhail Fursov ------=_Part_55965_26925057.1161076705341--