This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit/ada+testsuite] print ada boolean expression results as true/false


> Date: Thu, 27 Dec 2007 22:15:13 -0800
> From: Joel Brobecker <brobecker@adacore.com>

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]