From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <20120213203456.GC26954@acm.acm> (raw)
In-Reply-To: <4F394100.2030704@cs.ucla.edu>
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
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 #2: stdint.h.bz2 --]
[-- Type: application/x-bzip2, Size: 4524 bytes --]
[-- Attachment #3: config.h.bz2 --]
[-- Type: application/x-bzip2, Size: 10326 bytes --]
[-- Attachment #4: config.log.bz2 --]
[-- Type: application/x-bzip2, Size: 30532 bytes --]
[-- Attachment #5: alloc.cpp.bz2 --]
[-- Type: application/x-bzip2, Size: 88364 bytes --]
next prev parent reply other threads:[~2012-02-13 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-12 11:02 Building: alloc.c:766:1: error: negative width in bit-field `_gl_verify_error_if_negative' Alan Mackenzie
2012-02-12 21:31 ` Paul Eggert
2012-02-13 13:07 ` Alan Mackenzie
2012-02-13 16:57 ` Paul Eggert
2012-02-13 20:34 ` Alan Mackenzie [this message]
2012-02-13 20:50 ` Paul Eggert
2012-02-13 22:41 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120213203456.GC26954@acm.acm \
--to=acm@muc.de \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.