[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bitrotate
From: |
Eric Blake |
Subject: |
Re: bitrotate |
Date: |
Tue, 2 Sep 2008 14:12:00 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Simon Josefsson <simon <at> josefsson.org> writes:
>
> Thanks for ideas. I have pushed this.
>
>
> +#if defined UINT64_MAX && defined UINT64_C
Bruno's point was that UINT64_C is not usable in C++ programs. Checking
UINT64_MAX is sufficient, so lose the &&.
> +/* Given an unsigned 64-bit argument X, return the value corresponding
> + to rotating the bits N steps to the left. N must be between 1 and
> + 31 inclusive. */
s/31/63/ (two instances in your patch).
> +
> +#if defined(UINT64_MAX) && defined(UINT64_C)
The preferred gnulib style avoids excess parens:
#if defined UINT64_MAX && defined UINT64_C
although, as mentioned for C++, this is better written as:
#ifdef UINT64_MAX
> +#endif
Personally, I like to see a comment of what an #endif matches, when it is more
than a screenful away.
--
Eric Blake
- Re: bitrotate, Simon Josefsson, 2008/09/01
- Re: bitrotate, Paolo Bonzini, 2008/09/01
- Re: bitrotate, Bruno Haible, 2008/09/01
- Re: bitrotate, Simon Josefsson, 2008/09/01
- Re: bitrotate, Simon Josefsson, 2008/09/01
- Re: bitrotate, Ben Pfaff, 2008/09/01
- Re: bitrotate, Bruno Haible, 2008/09/01
- Re: bitrotate, Simon Josefsson, 2008/09/02
- Re: bitrotate,
Eric Blake <=
- Re: bitrotate, Simon Josefsson, 2008/09/02