From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19828 invoked by alias); 7 May 2010 16:11:03 -0000 Received: (qmail 19805 invoked by uid 22791); 7 May 2010 16:10:59 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 May 2010 16:10:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 82BF62BAB87; Fri, 7 May 2010 12:10:49 -0400 (EDT) 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 WxHsfFlU8YG7; Fri, 7 May 2010 12:10:49 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4E3B62BAB7B; Fri, 7 May 2010 12:10:49 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B58B4F58F9; Fri, 7 May 2010 09:10:35 -0700 (PDT) Date: Fri, 07 May 2010 16:11:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [RFC] pascal support sizeof (expression) Message-ID: <20100507161035.GA2768@adacore.com> References: <004c01caedfa$50bef820$f23ce860$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004c01caedfa$50bef820$f23ce860$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.20 (2009-06-14) 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-05/txt/msg00178.txt.bz2 > Once more, I ask before committing because I am > unsure about the ChangeLog entry: When unsure, I tend to look at prior art ;-). > Pierre Muller > Pascal language support maintainer for GDB > > 2010-05-07 Pierre Muller > > * p-exp.y (pascal_parse): Add support for `sizeof (expression)'. I usually tend to provide the name of the rule, like in makefiles... Or looking at Tom's entry: (exp : VARIABLE): Call write_dollar_variable. > Index: src/gdb/p-exp.y > =================================================================== > RCS file: /cvs/src/src/gdb/p-exp.y,v > retrieving revision 1.49 > diff -u -p -r1.49 p-exp.y > --- src/gdb/p-exp.y 6 May 2010 00:08:44 -0000 1.49 > +++ src/gdb/p-exp.y 6 May 2010 23:06:14 -0000 > @@ -525,6 +525,9 @@ exp : SIZEOF '(' type ')' %prec UNARY > write_exp_elt_opcode (OP_LONG); } > ; > > +exp : SIZEOF '(' exp ')' %prec UNARY > + { write_exp_elt_opcode (UNOP_SIZEOF); } > + > exp : STRING > { /* C strings are converted into array constants > with > an explicit null byte added at the end. Thus -- Joel