* [RFC] ||/&& placement
@ 2008-01-29 4:18 Doug Evans
2008-01-29 4:53 ` Eli Zaretskii
2008-01-29 6:42 ` Joel Brobecker
0 siblings, 2 replies; 3+ messages in thread
From: Doug Evans @ 2008-01-29 4:18 UTC (permalink / raw)
To: gdb-patches
Hi. Do changes like the following fall under the "obvious" rule?
[One might want to fold the && plus its next line into one line -
I think it's reasonable, but it's orthogonal to the question I'm
asking here.]
2008-01-28 Doug Evans <dje@google.com>
* typeprint.c (whatis_exp): Fix formatting.
Index: typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/typeprint.c,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 typeprint.c
--- typeprint.c 1 Jan 2008 22:53:13 -0000 1.30
+++ typeprint.c 29 Jan 2008 03:38:10 -0000
@@ -133,8 +133,8 @@ whatis_exp (char *exp, int show)
if (objectprint)
{
- 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))
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] ||/&& placement
2008-01-29 4:18 [RFC] ||/&& placement Doug Evans
@ 2008-01-29 4:53 ` Eli Zaretskii
2008-01-29 6:42 ` Joel Brobecker
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2008-01-29 4:53 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
> Date: Mon, 28 Jan 2008 19:42:12 -0800 (PST)
> From: dje@google.com (Doug Evans)
>
> Hi. Do changes like the following fall under the "obvious" rule?
Yes.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] ||/&& placement
2008-01-29 4:18 [RFC] ||/&& placement Doug Evans
2008-01-29 4:53 ` Eli Zaretskii
@ 2008-01-29 6:42 ` Joel Brobecker
1 sibling, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2008-01-29 6:42 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-29 6:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 4:18 [RFC] ||/&& placement Doug Evans
2008-01-29 4:53 ` Eli Zaretskii
2008-01-29 6:42 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox