This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] ||/&& placement
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 28 Jan 2008 22:31:49 -0800
- Subject: Re: [RFC] ||/&& placement
- References: <20080129034212.D1CDF1C72AA@localhost>
> Hi. Do changes like the following fall under the "obvious" rule?
As Eli already said, yes.
> 2008-01-28 Doug Evans <dje@google.com>
>
> * typeprint.c (whatis_exp): Fix formatting.
But...
> - if (((TYPE_CODE (type) == TYPE_CODE_PTR) ||
> - (TYPE_CODE (type) == TYPE_CODE_REF))
> + if (((TYPE_CODE (type) == TYPE_CODE_PTR)
> + || (TYPE_CODE (type) == TYPE_CODE_REF))
> &&
> (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
> {
While you're at it, could you remove the parens that look useless
and confusing to me, and also fix the formatting of the line after
the &&?
if ((TYPE_CODE (type) == TYPE_CODE_PTR
|| TYPE_CODE (type) == TYPE_CODE_REF)
&& TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS)
(please run the testsuite just to be extra-safe!)
Thanks,
--
Joel