emacs-devel
[Top][All Lists]
Advanced

[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 20:34:56 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Paul,

On Mon, Feb 13, 2012 at 08:57:36AM -0800, Paul Eggert wrote:
> On 02/13/2012 05:07 AM, Alan Mackenzie wrote:

> My guess is that PTRDIFF_MAX is set incorrectly in your implementation.
> Emacs's 'configure' script attempts to detect that, and replace it
> with a correct PTRDIFF_MAX, but perhaps we need to improve 'configure'
> so that it detects the problem with your implementation.

> Can you send the compressed "gcc -E ..." output of the offending
> compilation, and the contents of 'config.log' and 'src/config.h' and
> (if present) 'lib/stdint.h'?  That should help debug the situation.
> Also, if you could determine which standard header is defining
> ptrdiff_t and PTRDIFF_MAX, and what they're defined to, that might
> help.

I think i've tracked down PTRDIFF_MAX's value from looking at the after
CPP version of xnmalloc:  Together with my evaluation, it looks like
this:

(((1) ? ~ ((1) ? (- ((0l) + 1) << ((0) ? (0) - 1 : 0)) : (0l)) : ((((0l) + 1) 
<< ((0) ? (0) - 1 - (1) : 0)) - 1) * 2 + 1))
        ~ ((1) ? (- ((0l) + 1) << ((0) ? (0) - 1 : 0)) : (0l))
                ~        (- ((0l) + 1) << ((0) ? (0) - 1 : 0))
                        ~        (-      2     <<                  0 )
                                ~                       -2
                                                1

Somehow I must have made a mistake, surely.  PTRDIFF_MAX cannot be 1.

This definition of PTRDIFF_MAX can only have come from
emacs/lib/stdint.h, because it is here defined as a complex macro whereas
the competing version in /usr/include/stdint.h just has 2147483647 and
the 64-bit equivalent.  I can't find the definition of ptrdiff_t.

Anyhow, I've attached the "gcc -E ...", config.log, src/config.h and
lib/stdint.h.

-- 
Alan Mackenzie (Nuremberg, Germany).

Attachment: stdint.h.bz2
Description: BZip2 compressed data

Attachment: config.h.bz2
Description: BZip2 compressed data

Attachment: config.log.bz2
Description: BZip2 compressed data

Attachment: alloc.cpp.bz2
Description: BZip2 compressed data


reply via email to

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