From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 10 09:51:50 2016 Received: (at submit) by debbugs.gnu.org; 10 Apr 2016 13:51:50 +0000 Received: from localhost ([127.0.0.1]:56672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apFmI-0001oF-DB for submit@debbugs.gnu.org; Sun, 10 Apr 2016 09:51:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apFmG-0001o3-Ps for submit@debbugs.gnu.org; Sun, 10 Apr 2016 09:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apFmA-0006cr-HI for submit@debbugs.gnu.org; Sun, 10 Apr 2016 09:51:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apFmA-0006cn-EH for submit@debbugs.gnu.org; Sun, 10 Apr 2016 09:51:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apFm9-0000Km-7k for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 09:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apFm8-0006cX-6M for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 09:51:41 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:35789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apFm7-0006cI-Rw for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 09:51:40 -0400 Received: by mail-wm0-x229.google.com with SMTP id 191so59295136wmq.0 for ; Sun, 10 Apr 2016 06:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=1EWPHrPXthGOaJRd/Ynaekt5iL58fo9eSjbjilSNu5A=; b=tMIk7hF0SCdPZloMkhEy3ziD5Te384I4GKQznZN37DD4exhe2dy3iXtJ/75SaD65CX 69AJQylfIK73l2NPdI2XAKkeYI5bNFTpj6ksWxXLTtHxTnDgdg/4ZQhrR2KHlbuH/oDh gM7NZLcK7BaBvIquEckgdBrlZ+eXqHghQO8v15idJiNDKOaqJErx44/ULjOLWgKhDmA0 O6tx5mLE0Rjt5CIosjPJcYcZw2122M9qT7y1p7cgrO3EsSwWqrFyzqgOHdcjo5Ol7SVd R1KN7maNy8d+uJBtytHxe+dE8zhyT/z7mWPeKx+IgyqRah5x21bNR3ogGkDVhfq60n8K HWfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=1EWPHrPXthGOaJRd/Ynaekt5iL58fo9eSjbjilSNu5A=; b=QibCzETEQ6fuXNX6Xiel0YRemImjgXyrSz5m4h8PpBoFg2HW0Qf9ISSMj/7VAlJx0t ZcD6DuUW+5jxcMQH5CXTPUyHBArMGIEcr2GCo/edPYrJmXpWz68hh+fovljCOqWR7kjG tbEPXsRxDVEyYzwlKGGtbYvYhzXmSB+gB9nGeNkML2krPan3v/+ZYYVn1khi5D26K2JY NRg8DTwMrYtLd5ZzYPgz9OB9WZvFXKwTx2bmqIQJBHoG7HnHoTWJkT51paLBbIaiRBZF kMJm+BCcp6N2W5joYcM8qq1hmmI6eQ+BAOWxBozxJgES18JQJa2ZSwFFwTRgLfRsuOVO qD1w== X-Gm-Message-State: AD7BkJKLCrEx4x/vub3769EwFe6coH09683LFSWRJ+gcKdSSJMytsFEOTDvKWFqpsA6BgA== X-Received: by 10.28.175.201 with SMTP id y192mr13950229wme.54.1460296298590; Sun, 10 Apr 2016 06:51:38 -0700 (PDT) Received: from p ([2001:4c50:32e:7500:a57d:cb72:9e12:1f3b]) by smtp.gmail.com with ESMTPSA id b135sm12511675wmb.10.2016.04.10.06.51.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Apr 2016 06:51:37 -0700 (PDT) From: Philipp Stephani To: bug-gnu-emacs@gnu.org Subject: 25.0.92; Undefined behavior in lib/stdint.h Date: Sun, 10 Apr 2016 15:51:31 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) Clang finds the following undefined behavior in lib/stdint.h: ./lisp.h:3705:3: warning: shifting a negative signed value is undefined [-Wshift-negative-value] XSETPVECTYPE (XVECTOR (v), PVEC_SUB_CHAR_TABLE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./lisp.h:1124:24: note: expanded from macro 'XSETPVECTYPE' ((v)->header.size |= PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS)) ^~~~~~~~~~~~~~~~~ ./lisp.h:763:43: note: expanded from macro 'PSEUDOVECTOR_FLAG' # define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2) ^~~~~~~~~~~ ../lib/stdint.h:520:5: note: expanded from macro 'PTRDIFF_MAX' _STDINT_MAX (1, 64, 0l) ^~~~~~~~~~~~~~~~~~~~~~~ ../lib/stdint.h:126:8: note: expanded from macro '_STDINT_MAX' ? ~ _STDINT_MIN (signed, bits, zero) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/stdint.h:122:31: note: expanded from macro '_STDINT_MIN' ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) ~~~~~~~~~~~~~~ ^ Could we maybe just remove stdint.h completely? It should always be provided by the standard C library. In GNU Emacs 25.0.92.3 (x86_64-apple-darwin15.4.0, NS appkit-1404.46 Version 10.11.4 (Build 15E65)) of 2016-04-10 built on p Repository revision: c8b868b1e2532aa07dbf4959798dbdc52ea9b5d5 Windowing system distributor 'Apple', version 10.3.1404 Configured using: 'configure --without-xml2 --with-modules' Configured features: RSVG IMAGEMAGICK DBUS NOTIFY ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 196096 6054) (symbols 48 19783 0) (miscs 40 43 131) (strings 32 15118 5931) (string-bytes 1 441818) (vectors 16 32893) (vector-slots 8 652477 6669) (floats 8 162 19) (intervals 56 196 0) (buffers 976 11)) From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 10 11:06:31 2016 Received: (at 23261) by debbugs.gnu.org; 10 Apr 2016 15:06:31 +0000 Received: from localhost ([127.0.0.1]:57370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apGwY-0003kM-QD for submit@debbugs.gnu.org; Sun, 10 Apr 2016 11:06:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apGwX-0003kA-0x for 23261@debbugs.gnu.org; Sun, 10 Apr 2016 11:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apGwO-0006Fg-T1 for 23261@debbugs.gnu.org; Sun, 10 Apr 2016 11:06:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apGwO-0006Fc-QX; Sun, 10 Apr 2016 11:06:20 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3477 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1apGwO-00023O-12; Sun, 10 Apr 2016 11:06:20 -0400 Date: Sun, 10 Apr 2016 18:05:46 +0300 Message-Id: <83shyth5bp.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Sun, 10 Apr 2016 15:51:31 +0200) Subject: Re: bug#23261: 25.0.92; Undefined behavior in lib/stdint.h References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23261 Cc: 23261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Philipp Stephani > Date: Sun, 10 Apr 2016 15:51:31 +0200 > > Could we maybe just remove stdint.h completely? It should always be > provided by the standard C library. If you have lib/stdint.h, it means the configure script found the one that came with your library deficient in some sense; look in config.log to see why. E.g., on my system lib/stdint.h is not generated and not used. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 11 03:23:26 2016 Received: (at 23261) by debbugs.gnu.org; 11 Apr 2016 07:23:26 +0000 Received: from localhost ([127.0.0.1]:57952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apWBy-0002FN-Jr for submit@debbugs.gnu.org; Mon, 11 Apr 2016 03:23:26 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apWBx-0002F8-Eb for 23261@debbugs.gnu.org; Mon, 11 Apr 2016 03:23:25 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9E885160FD3; Mon, 11 Apr 2016 00:23:19 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id TeHQpBid_OFb; Mon, 11 Apr 2016 00:23:19 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EBFEB160FF2; Mon, 11 Apr 2016 00:23:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jT8ogu15cNW6; Mon, 11 Apr 2016 00:23:18 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CF82A160FD3; Mon, 11 Apr 2016 00:23:18 -0700 (PDT) To: Philipp Stephani From: Paul Eggert Subject: Re: 25.0.92; Undefined behavior in lib/stdint.h Organization: UCLA Computer Science Department Message-ID: <570B50E3.7080704@cs.ucla.edu> Date: Mon, 11 Apr 2016 00:23:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23261 Cc: 23261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Could we maybe just remove stdint.h completely? It should always be > provided by the standard C library. Unfortunately stdint.h is not portable in practice, as many C implementations don't conform to C11 or even to C99. It sounds like your platform has a problem in this area. Emacs provides a replacement stdint.h on platforms that don't conform to the standards. I don't observe a problem with my clang installation (clang 3.7.0 on Fedora 23 x86-64). I configured with './configure CC=clang', and on my platform the system stdint.h was fine so lib/stdint.h was not created. Perhaps you could look in your config.log near the strings "checking whether stdint.h ..." and see why your clang has problems with its stdint.h, and debug what went wrong. Another possibility is to futz with your CFLAGS to cajole clang into not issuing the bogus warning. Yet another possibility is to switch to GCC. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 11 12:17:40 2016 Received: (at 23261) by debbugs.gnu.org; 11 Apr 2016 16:17:40 +0000 Received: from localhost ([127.0.0.1]:59645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apeWy-0001z7-7T for submit@debbugs.gnu.org; Mon, 11 Apr 2016 12:17:40 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apeWw-0001ys-7k for 23261@debbugs.gnu.org; Mon, 11 Apr 2016 12:17:38 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A3255160FD3; Mon, 11 Apr 2016 09:17:31 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id uiqguZ0ajXLM; Mon, 11 Apr 2016 09:17:30 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6A7AB16126F; Mon, 11 Apr 2016 09:17:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DUIbIiv3vkdl; Mon, 11 Apr 2016 09:17:24 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7F08016126D; Mon, 11 Apr 2016 09:17:23 -0700 (PDT) Subject: Re: 25.0.92; Undefined behavior in lib/stdint.h To: Philipp Stephani References: <570B50E3.7080704@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <570BCE13.9000006@cs.ucla.edu> Date: Mon, 11 Apr 2016 09:17:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <570B50E3.7080704@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23261 Cc: 23261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 04/11/2016 12:23 AM, Paul Eggert wrote: > > I don't observe a problem with my clang installation (clang 3.7.0 on > Fedora 23 x86-64). I managed to reproduce the problem in Gnulib by artificially pretending to 'configure' that clang's stdint.h was busted, using './configure gl_cv_header_working_stdint_h=no'. I installed a fix for the problem into Gnulib here: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=705764b377ebeef7bdba1a87fafd99cd56b6f3c9 I ran 'admin/merge-gnulib' to propagate the fix into emacs-25, and then merged emacs-25 into master using the procedure described in 'admin/notes/git-workflow'. Please give this a try on your setup. Do a 'make clean' before running 'make'. If 'make' is still building lib/stdint.h, please investigate why './configure' decides that clang's stdint.h is buggy. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 09:48:28 2016 Received: (at 23261) by debbugs.gnu.org; 17 Apr 2016 13:48:28 +0000 Received: from localhost ([127.0.0.1]:37853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arn3s-0006Ls-JH for submit@debbugs.gnu.org; Sun, 17 Apr 2016 09:48:28 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:36646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arn3q-0006Le-4M for 23261@debbugs.gnu.org; Sun, 17 Apr 2016 09:48:26 -0400 Received: by mail-lf0-f45.google.com with SMTP id g184so190745035lfb.3 for <23261@debbugs.gnu.org>; Sun, 17 Apr 2016 06:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7yMA5NSHqdwcX0wW9ZrhQhVbbVglwKECiEF2VKcc0jU=; b=TJvDwXdVKawGlni3fwfEWTyiWF+VfsXy9ifmzpk3hDohRfxGQYE253LqPNpoVKkTi0 I0E2TaCB1qNMGJVa8oRKBMmLPsgbpZXK0keX8jlryJ7pW2FSYdS5AhCQGyzi93TgaDaB hsD1ohBiAC+UVC4rUGG6z9zUPTcE2TQpdjveO+zatbr3gLcUOcOqsdAJd5+VzujN03h8 P3imxRfFa3VQPUYnlKTPsE0t4dMA6zYDmB3ip1tOOdwFNo+ybmG32tpSB0LzzxYBP18w mvsCyxaT1kFnc5nc2GIr5xa61vatogvqTKshGMHJNaNYq777MckFffUReORVlFjkcsjA xkCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7yMA5NSHqdwcX0wW9ZrhQhVbbVglwKECiEF2VKcc0jU=; b=Tx9qe8Yh7ZuRCOv3arw1IwZAwMhFrOJVhxdDeXfDDioOUnhWKy47u+jm1Su721JfrW ZJMBi3GKHS0bBJSUcK1s1WARumondCetHoOXuk9UKCAlhNBAdJ+D9e56GET9swjf4ogK YLrgXqaXMj5TaVvW3yvCKENMOywWzhcVKlaLbSw56dNaatPchPHFkO8CwyPla0ueU0bs hGwo5MdWp9/tsphd+/KT1/q7iPnXEMsMNtfGtK4arCu26pc/rUH4N2QL9v9v/iNWgEVT FwGwBQXAqRfDqbD5/TFLSrxecy9IQEmpKEbzJuuHjRE4gq4dpCnhg+7Uonmvoev08Qbs VzLg== X-Gm-Message-State: AOPr4FVPLQXkgPo4JT4p8gxZi9BVpOvM8VUPjid6KW47AxgSOYBUX7ryZXplu1Vs0dSDMljV9LWc5qneO1XjVQ== X-Received: by 10.25.21.231 with SMTP id 100mr12786361lfv.146.1460900900095; Sun, 17 Apr 2016 06:48:20 -0700 (PDT) MIME-Version: 1.0 References: <570B50E3.7080704@cs.ucla.edu> <570BCE13.9000006@cs.ucla.edu> In-Reply-To: <570BCE13.9000006@cs.ucla.edu> From: Philipp Stephani Date: Sun, 17 Apr 2016 13:48:10 +0000 Message-ID: Subject: Re: bug#23261: 25.0.92; Undefined behavior in lib/stdint.h To: Paul Eggert Content-Type: multipart/alternative; boundary=001a113f186633cf230530ae7f26 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23261 Cc: 23261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --001a113f186633cf230530ae7f26 Content-Type: text/plain; charset=UTF-8 Paul Eggert schrieb am Mo., 11. Apr. 2016 um 18:18 Uhr: > On 04/11/2016 12:23 AM, Paul Eggert wrote: > > > > I don't observe a problem with my clang installation (clang 3.7.0 on > > Fedora 23 x86-64). > > I managed to reproduce the problem in Gnulib by artificially pretending > to 'configure' that clang's stdint.h was busted, using './configure > gl_cv_header_working_stdint_h=no'. I installed a fix for the problem > into Gnulib here: > > > http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=705764b377ebeef7bdba1a87fafd99cd56b6f3c9 > > I ran 'admin/merge-gnulib' to propagate the fix into emacs-25, and then > merged emacs-25 into master using the procedure described in > 'admin/notes/git-workflow'. > > Please give this a try on your setup. Thanks, the relevant warning messages are now gone. > Do a 'make clean' before running > 'make'. If 'make' is still building lib/stdint.h, please investigate why > './configure' decides that clang's stdint.h is buggy. > > > Because I think there's an actual bug in stdint.h on OS X. UINT8_C(n) is required to expand to a constant that should be promoted to the same type that uint8_t(0) gets promoted to, which is int. However, on OS X, UINT8_C(n) expands to n##U, which gets promoted to unsigned int. By contrast, the definition in GCC 5.3 is just 'n'. The question here is whether Gnulib should really redefine all macros if only a small subset (here: UINT8_C and UINT16_C) are incorrect. --001a113f186633cf230530ae7f26 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Paul E= ggert <eggert@cs.ucla.edu> = schrieb am Mo., 11. Apr. 2016 um 18:18=C2=A0Uhr:
On 04/11/2016 12:23 AM, Paul Eggert wrote:
>
> I don't observe a problem with my clang installation (clang 3.7.0 = on
> Fedora 23 x86-64).

I managed to reproduce the problem in Gnulib by artificially pretending
to 'configure' that clang's stdint.h was busted, using './c= onfigure
gl_cv_header_working_stdint_h=3Dno'. I installed a fix for the problem<= br> into Gnulib here:

htt= p://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=3D705764b377ebeef7bdba1= a87fafd99cd56b6f3c9

I ran 'admin/merge-gnulib' to propagate the fix into emacs-25, and = then
merged emacs-25 into master using the procedure described in
'admin/notes/git-workflow'.

Please give this a try on your setup.

Thank= s, the relevant warning messages are now gone.
=C2=A0
Do a 'make clean' before running
'make'. If 'make' is still building lib/stdint.h, please in= vestigate why
'./configure' decides that clang's stdint.h is buggy.



Because I think there's an actual = bug in stdint.h on OS X. UINT8_C(n) is required to expand to a constant tha= t should be promoted to the same type that uint8_t(0) gets promoted to, whi= ch is int. However, on OS X, UINT8_C(n) expands to n##U, which gets promote= d to unsigned int. By contrast, the definition in GCC 5.3 is just 'n= 9;.

The question here is whether Gnulib should rea= lly redefine all macros if only a small subset (here: UINT8_C and UINT16_C)= are incorrect.
--001a113f186633cf230530ae7f26-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 13:13:09 2016 Received: (at control) by debbugs.gnu.org; 17 Apr 2016 17:13:09 +0000 Received: from localhost ([127.0.0.1]:38616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arqFx-0002tr-2y for submit@debbugs.gnu.org; Sun, 17 Apr 2016 13:13:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arqFv-0002tb-N1 for control@debbugs.gnu.org; Sun, 17 Apr 2016 13:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arqFq-00006R-0j for control@debbugs.gnu.org; Sun, 17 Apr 2016 13:13:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arqFp-00006N-Th for control@debbugs.gnu.org; Sun, 17 Apr 2016 13:13:01 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1arqFp-0001dA-JL for control@debbugs.gnu.org; Sun, 17 Apr 2016 13:13:01 -0400 Subject: control message for bug 23261 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sun, 17 Apr 2016 13:13:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) close 23261 25.0.93 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 18 00:30:32 2016 Received: (at 23261) by debbugs.gnu.org; 18 Apr 2016 04:30:32 +0000 Received: from localhost ([127.0.0.1]:38801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1as0pT-0005Mb-TN for submit@debbugs.gnu.org; Mon, 18 Apr 2016 00:30:32 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1as0pS-0005MM-0x for 23261@debbugs.gnu.org; Mon, 18 Apr 2016 00:30:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1232716125A; Sun, 17 Apr 2016 21:30:23 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id PM7t62yOtXsX; Sun, 17 Apr 2016 21:30:22 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 68E00161266; Sun, 17 Apr 2016 21:30:22 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8J4xGluU72aJ; Sun, 17 Apr 2016 21:30:22 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4929716125A; Sun, 17 Apr 2016 21:30:22 -0700 (PDT) Subject: Re: bug#23261: 25.0.92; Undefined behavior in lib/stdint.h To: Philipp Stephani References: <570B50E3.7080704@cs.ucla.edu> <570BCE13.9000006@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <571462DE.40602@cs.ucla.edu> Date: Sun, 17 Apr 2016 21:30:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 23261 Cc: 23261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philipp Stephani wrote: > The question here is whether Gnulib should really redefine all macros if > only a small subset (here: UINT8_C and UINT16_C) are incorrect. Why not, as long as Gnulib does so correctly? Platforms that are buggy in one part of stdint.h tend to be buggy in others, and I'd rather not waste maintenance effort worrying about individual stdint.h bugs. From unknown Sun Sep 07 01:05:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 May 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator