From: Daniel Colascione <dancol@dancol.org>
To: Emacs development discussions <emacs-devel@gnu.org>
Subject: INT_ADD_OVERFLOW broken?
Date: Sat, 21 Sep 2013 17:39:26 -0700 [thread overview]
Message-ID: <523E3C3E.4080003@dancol.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
When trying to compile this code:
if (INT_ADD_OVERFLOW ((ptrdiff_t) (bool_header_size - header_size),
total_payload_bytes))
memory_full (SIZE_MAX);
gcc produces this warning:
alloc.c:2051: warning: assuming signed overflow does not occur when
assuming that (X + c) >= X is always true [-Wstrict-overflow]
Is INT_ADD_OVERFLOW actually safe?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2013-09-22 0:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-22 0:39 Daniel Colascione [this message]
2013-09-22 6:59 ` INT_ADD_OVERFLOW broken? 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=523E3C3E.4080003@dancol.org \
--to=dancol@dancol.org \
--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.