From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25639 invoked by alias); 1 Dec 2004 11:40:20 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25567 invoked from network); 1 Dec 2004 11:40:14 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sourceware.org with SMTP; 1 Dec 2004 11:40:14 -0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id D24A79646; Wed, 1 Dec 2004 06:40:13 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06667-01-3; Wed, 1 Dec 2004 06:40:13 -0500 (EST) Received: from [127.0.0.1] (taconic.gnat.com [205.232.38.103]) by nile.gnat.com (Postfix) with ESMTP id 868B99618; Wed, 1 Dec 2004 06:40:13 -0500 (EST) Message-ID: <41ADADA0.3080908@gnat.com> Date: Wed, 01 Dec 2004 11:40:00 -0000 From: Robert Dewar User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) MIME-Version: 1.0 To: Paul Schlie Cc: gcc@gcc.gnu.org Subject: Re: INT_MIN % -1 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at nile.gnat.com X-SW-Source: 2004-12/txt/msg00031.txt.bz2 Paul Schlie wrote: > Understood, as ADA programs may bound the domain of it's variables > guaranteeing that the operation would be well behaved within the bounds of > it's operands; but wonder if saving a few cycles out of the likely several > required for a divide or modulo operation would likely be worth the added, > albeit minor, complexity? > > I think so, it's by far the most common case, and it is a pity to take a hit in the normal case in Ada just so that a pathological case in C can be done right :-) Actually even in C, you can often tell that the bad case is impossible. P.S. The language is Ada, not ADA, it's a woman's name. ADA is the Americans with Disability Act (among others) and there is a great poster of Clinton saying "I want you to pay attention to ADA!" :-)