all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: 23261@debbugs.gnu.org
Subject: bug#23261: 25.0.92; Undefined behavior in lib/stdint.h
Date: Sun, 10 Apr 2016 15:51:31 +0200	[thread overview]
Message-ID: <m2oa9h4lng.fsf@gmail.com> (raw)


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))





             reply	other threads:[~2016-04-10 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 13:51 Philipp Stephani [this message]
2016-04-10 15:05 ` bug#23261: 25.0.92; Undefined behavior in lib/stdint.h Eli Zaretskii
2016-04-11  7:23 ` Paul Eggert
2016-04-11 16:17   ` Paul Eggert
2016-04-17 13:48     ` Philipp Stephani
2016-04-18  4:30       ` Paul Eggert

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=m2oa9h4lng.fsf@gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=23261@debbugs.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.