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: [RFC] ||/&& placement


> 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


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