bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: count-one-bits: compilation failure with HP-UX cc


From: James Youngman
Subject: Re: count-one-bits: compilation failure with HP-UX cc
Date: Sun, 13 Apr 2008 20:04:30 +0100

On Sun, Apr 13, 2008 at 6:25 PM, Bruno Haible <address@hidden> wrote:
> The count-one-bits module fails to compile with HP-UX 11 "cc -Ae":
[...]
>  Very strange compiler bug:
>
>   $ cat foo.c
>   typedef struct { unsigned int x: ((1U >> 31 <= 3) * 2 - 1); } foo;
>   $ cc -Ae -c foo.c
>   cc: "foo.c", line 1: error 1511: Bit-field size must be a constant.
>   cc: "foo.c", line 1: error 1613: Zero-sized struct.
>
>  I'm working around it like this:
>
>
>  2008-04-13  Bruno Haible  <address@hidden>
>
>         * lib/count-one-bits.h (COUNT_ONE_BITS): Rewrite verification
>         expression, so as to avoid HP-UX 11 cc compiler bug.

It might be worth including a comment explaining the problem in the
source, so that the somebody else does not accidentally re-introduce
the same bug.

James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]