[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Completion_heads_engraver broken?
From: |
David Kastrup |
Subject: |
Re: [PATCH] Completion_heads_engraver broken? |
Date: |
Thu, 26 Feb 2009 11:32:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Michael Käppler <address@hidden> writes:
> Nevertheless, please test and critizize!
> +inline int
> +shift_left (int value, int shiftamount)
> +{
> + if (shiftamount < 0) return (value >> abs(shiftamount));
> + else return (value << shiftamount);
> +}
I would not use abs(shiftamount) here, but -shiftamount since you
already tested the sign.
Also the comment is misleading: x << -2 is _not_ necessarily zero as the
comment proclaims, but rather is unspecified IIRC. It _could_ have
worked by chance and/or the whim of the compiler writers.
--
David Kastrup