This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Accelerate blocks sorting
On Mon, 22 Jun 2009 20:26:26 +0200, Tom Tromey wrote:
> This is also http://sourceware.org/bugzilla/show_bug.cgi?id=9988
Forgot to search for it again, sorry.
> Jan> + return (BLOCK_START (b) > BLOCK_START (a))
> Jan> + - (BLOCK_START (b) < BLOCK_START (a));
>
> This expression needs parens around it, according to GNU rules.
GNU Coding Standards provides this sample code line:
return ++x + bar ();
Moreover it has no sample code (and found no rules) with `return' using parens.
GDB uses `return' with parens a lot but I find it a GNU style violation by GDB
fixing it along in the patches.
Sure no problem to change it but is there any backing for such parens?
> I think you don't actually need a cleanup here, as nothing here can
> call error. However, if you want to leave it, that is also ok with
> me.
I did not notice, still I find the code safer that way.
Thanks,
Jan