[patch] s390*: watchpoints regression [repost]
Joel Brobecker
brobecker@adacore.com
Sun Dec 18 11:38:00 GMT 2011
> FYI I am aware of this rule and I try to follow it but it seems
> unnatural to me. It then requires new { brackets } and when reading
> the code I would more expect to see why the conditional happens, not
> why the return happens.
Interesting, the opposite feels completely unnatural to me: The comment
only applies if the condition is true, whereas in the case I was quoting,
it looks like it applies no matter what.
Regarding the extra curly braces, I think it's OK to leave them out,
like so:
if ([...])
/* This is a comment that ... */
return;
If we prefer keeping the comment before the condition, then I would
suggest we rewrite the comment to say so. Something like this:
/* If this is an old thread, or there is something else
special to it, then it's ok to do nothing. */
if ([...])
return;
--
Joel
More information about the Gdb-patches
mailing list