[Top][All Lists]

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

Re: Building: alloc.c:766:1: error: negative width in bit-field `_gl_ver

From: Alan Mackenzie
Subject: Re: Building: alloc.c:766:1: error: negative width in bit-field `_gl_verify_error_if_negative'
Date: Mon, 13 Feb 2012 13:07:02 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Paul.

On Sun, Feb 12, 2012 at 01:31:28PM -0800, Paul Eggert wrote:
> On 02/12/2012 03:02 AM, Alan Mackenzie wrote:
> > alloc.c:766:1: error: negative width in bit-field 
> > `_gl_verify_error_if_negative'

> I am not seeing this problem (trunk bzr 107261)
> on Fedora 15 x86-64 with GCC 4.6.2.

> That diagnostic is because the following static assertion
> is failing:

>   verify (INT_MAX <= PTRDIFF_MAX);

Hmmm.  I've grepped for "negative width in bit-field" and
_gl_verify_error_if_negative and found neither.  Come to that, I haven't
found verify either.

How can the compiler transform "INT_MAX <= PTRDIFF_MAX" into a message
about bit-field widths?

Is this not, perhaps, a bug in the compiler itself?

> which suggests that your compilation environment is misconfigured
> somehow -- I don't know of any platforms where INT_MAX
> is greater than PTRDIFF_MAX.

As far as I can make out, it isn't.  INT_MAX is 2^31-1 (checked by an
#ifdef and #warning).  PTRDIFF_MAX I couldn't verify directly, but in
/usr/include/limits.h it is either 2^31-1 or 2^63-1  (I have a 64-bit

> I suggest running 'make distclean; ./autogen.sh; ./configure; make',
> or if that fails a fresh checkout.

None of that worked.  :-(

I'm going to try googling for that error message.


Alan Mackenzie (Nuremberg, Germany).

reply via email to

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