From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7913 invoked by alias); 2 Nov 2010 08:23:44 -0000 Received: (qmail 7904 invoked by uid 22791); 2 Nov 2010 08:23:43 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate4.uk.ibm.com (HELO mtagate4.uk.ibm.com) (194.196.100.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 08:23:39 +0000 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id oA28NaiQ009128 for ; Tue, 2 Nov 2010 08:23:36 GMT Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oA28NcLB2727954 for ; Tue, 2 Nov 2010 08:23:38 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oA28NZix029072 for ; Tue, 2 Nov 2010 02:23:35 -0600 Received: from leonard.localnet (dyn-9-152-224-33.boeblingen.de.ibm.com [9.152.224.33]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oA28NYLT029063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Nov 2010 02:23:35 -0600 From: Ken Werner To: Tom Tromey Subject: Re: [patch] fix pre-/post- in-/decrement Date: Tue, 02 Nov 2010 08:23:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-22-generic-pae; KDE/4.5.1; i686; ; ) Cc: Joel Brobecker , Daniel Jacobowitz , Ulrich Weigand , gdb-patches@sourceware.org References: <201010041301.o94D1QHV032611@d12av02.megacenter.de.ibm.com> <201010190938.35120.ken@linux.vnet.ibm.com> In-Reply-To: <201010190938.35120.ken@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011020923.34670.ken@linux.vnet.ibm.com> X-IsSubscribed: yes 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: 2010-11/txt/msg00018.txt.bz2 On Tuesday, October 19, 2010 9:38:34 am Ken Werner wrote: > On Wednesday, October 13, 2010 9:00:28 pm Tom Tromey wrote: > > Ken> I don't see how to control the type of the result of an operator > > Ken> there. I'm still quite new to the GDB parsing internals and would > > Ken> appreciate any insights. > > > > It is probably a bit of a pain, since the IR generated by the parser is > > a bit unusual (as compilers go). > > > > However, it seems to me that it would be much friendlier for users to > > report this as a parse error rather than a runtime error. > > > > One option would be to write a C/C++ implementation of the language_defn > > la_post_parser method, which would look at the expression to see if this > > constraint is violated. > > > > Another option would be to try to implement it in the grammar. > > Ok - I see. Thanks for your suggestions. This seems to be something bigger > and could be implemented as part of a future patch :). I think for now the > non- language dependent parts of the patch would be sufficient. > The attached patch only contains the fix for the post in-/decrement > operators as this is what the vec_unop patch > (http://sourceware.org/ml/gdb- > patches/2010-10/msg00031.html) prevents from going upstream. > Tested on i686-*-linux-gnu with no regressions. > OK to apply? Ping. : ) Regards Ken