From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 560 invoked by alias); 29 Jan 2008 06:42:12 -0000 Received: (qmail 551 invoked by uid 22791); 29 Jan 2008 06:42:12 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jan 2008 06:41:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 897B32A9658; Tue, 29 Jan 2008 01:41:52 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id b5kj8EzHeelQ; Tue, 29 Jan 2008 01:41:52 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3B97B2A9643; Tue, 29 Jan 2008 01:41:52 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id A8D28E7ACB; Mon, 28 Jan 2008 22:41:48 -0800 (PST) Date: Tue, 29 Jan 2008 07:35:00 -0000 From: Joel Brobecker To: Doug Evans Cc: GDB Patches , Pierre Muller Subject: Re: [BUG] BINOP_DIV and ptyp command Message-ID: <20080129064148.GB16288@adacore.com> References: <002301c85c12$a73a4640$f5aed2c0$@u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00669.txt.bz2 > I may be missing something, but it seems like special casing > EVAL_AVOID_SIDE_EFFECTS for DIV/MOD/REM is no longer useful here I don't think this is right. EVAL_AVOID_SIDE_EFFECTS is used when computing the actual value is not needed. For instance, when you do "ptype", the expression is evaluated in that mode. So when you do "ptype 3 div 2", we don't do the division, we just know that we're only interested in the type of result. So the expression evaluator will return a struct value of the correct type but with a bogus contents, instead of doing the division, only to discard the result down the road. So the code you suggested we remove is useful. -- Joel