From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20832 invoked by alias); 28 Dec 2007 10:33:20 -0000 Received: (qmail 20819 invoked by uid 22791); 28 Dec 2007 10:33:19 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Dec 2007 10:33:09 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id lBSAWghe024224; Fri, 28 Dec 2007 11:32:42 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id lBSAWfAR000724; Fri, 28 Dec 2007 11:32:41 +0100 (CET) Date: Fri, 28 Dec 2007 10:33:00 -0000 Message-Id: <200712281032.lBSAWfAR000724@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20071228061513.GA24450@adacore.com> (message from Joel Brobecker on Thu, 27 Dec 2007 22:15:13 -0800) Subject: Re: [commit/ada+testsuite] print ada boolean expression results as true/false References: <20071228061513.GA24450@adacore.com> 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: 2007-12/txt/msg00433.txt.bz2 > Date: Thu, 27 Dec 2007 22:15:13 -0800 > From: Joel Brobecker Just a small nit: > Index: ada-lang.c > =================================================================== > RCS file: /cvs/src/src/gdb/ada-lang.c,v > retrieving revision 1.112 > diff -u -p -r1.112 ada-lang.c > --- ada-lang.c 24 Dec 2007 16:52:24 -0000 1.112 > +++ ada-lang.c 28 Dec 2007 06:09:19 -0000 > @@ -8151,6 +8151,24 @@ ada_evaluate_subexp (struct type *expect > else > return value_neg (arg1); > > + case BINOP_LOGICAL_AND: > + case BINOP_LOGICAL_OR: > + case UNOP_LOGICAL_NOT: > + *pos -= 1; > + return value_cast (LA_BOOL_TYPE, > + evaluate_subexp_standard (expect_type, exp, > + pos, noside)); I think the fact that you need three lines here means that it makes more sense to avoid the nested function calls and use a (temporary) variable instead.