From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19417 invoked by alias); 10 Aug 2005 15:44:40 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19403 invoked by uid 22791); 10 Aug 2005 15:44:36 -0000 Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 10 Aug 2005 15:44:36 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 467D7EA0E; Wed, 10 Aug 2005 17:44:34 +0200 (CEST) Received: from sykes.suse.de (sykes.suse.de [10.10.3.53]) by Relay1.suse.de (Postfix) with ESMTP id 31B2617B2D; Wed, 10 Aug 2005 17:44:33 +0200 (CEST) From: Andreas Schwab To: ramana.radhakrishnan@codito.com Cc: gdb@sources.redhat.com Subject: Re: Query regarding expression evaluation. References: <1123684979.29036.21.camel@localhost.localdomain> X-Yow: NATHAN... your PARENTS were in a CARCRASH!! They're VOIDED - They COLLAPSED They had no CHAINSAWS... They had no MONEY MACHINES... They did PILLS in SKIMPY GRASS SKIRTS... Nathan, I EMULATED them... but they were OFF-KEY... Date: Wed, 10 Aug 2005 15:44:00 -0000 In-Reply-To: <1123684979.29036.21.camel@localhost.localdomain> (Ramana Radhakrishnan's message of "Wed, 10 Aug 2005 20:12:59 +0530") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-08/txt/msg00043.txt.bz2 Ramana Radhakrishnan writes: > Look at PR1978 . The discrepancy is because in valarith.c , GDB takes > the operation to be unsigned depending only on the operand types. In the > case described in the PR this seems alright with respect to the C > standard since the result is implementation dependent. For the shift operator the result is completely independent of the type of the right operand. So the way gdb evaluates the expression is clearly wrong. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."