From: Philipp <p.stephani2@gmail.com>
To: noloader@gmail.com
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: warning: unsequenced modification and access to 'sa_avail'
Date: Sat, 27 Mar 2021 18:01:00 +0100 [thread overview]
Message-ID: <9BE71EF8-F41A-4E65-B91C-1D36643791B9@gmail.com> (raw)
In-Reply-To: <CAH8yC8n5-26GWt7YuGUQSs6waWR1bXO9mngu_CZh9AxuaOe-JQ@mail.gmail.com>
> Am 27.03.2021 um 17:05 schrieb Jeffrey Walton <noloader@gmail.com>:
>
> Hi Everyone,
>
> I'm building Emacs 27.2 on the Apple M1 machine. I think the compiler
> is complaining about undefined behavior:
>
> sa_avail -= (size), alloca (size)
>
> I think it is equivalent to something like this:
>
> data[i] = data[i++];
>
> /usr/bin/clang -c -I/usr/local/include -DNDEBUG -Demacs -I. -I.
> -I../lib -I../lib -I/usr/local/include/libxml2
> -I/usr/local/include -MMD -MF deps/doc.d -MP
> -I/usr/local/include -I/usr/local/include/p11-kit-1 -Wno-switch
> -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes
> -Wno-initializer-overrides -Wno-tautological-compare
> -Wno-tautological-constant-out-of-range-compare -g2 -O2 -fno-common
> -arch arm64 -fPIC -pthread doc.c
> /usr/bin/clang -c -I/usr/local/include -DNDEBUG -Demacs -I. -I.
> -I../lib -I../lib -I/usr/local/include/libxml2
> -I/usr/local/include -MMD -MF deps/editfns.d -MP
> -I/usr/local/include -I/usr/local/include/p11-kit-1 -Wno-switch
> -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes
> -Wno-initializer-overrides -Wno-tautological-compare
> -Wno-tautological-constant-out-of-range-compare -g2 -O2 -fno-common
> -arch arm64 -fPIC -pthread editfns.c
> editfns.c:2063:18: warning: unsequenced modification and access to 'sa_avail'
> [-Wunsequenced]
> .deletions = SAFE_ALLOCA (del_bytes),
> ^
> ./lisp.h:4817:9: note: expanded from macro 'SAFE_ALLOCA'
> ? AVAIL_ALLOCA (size) \
> ^
> ./lisp.h:4812:38: note: expanded from macro 'AVAIL_ALLOCA'
> #define AVAIL_ALLOCA(size) (sa_avail -= (size), alloca (size))
> ^
>
This has already been fixed by commit 6a4ed891d84b1ca1e4d68a6de9dd374f1fadd971, which hasn't made it into the release though.
next prev parent reply other threads:[~2021-03-27 17:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 16:05 warning: unsequenced modification and access to 'sa_avail' Jeffrey Walton
2021-03-27 17:01 ` Philipp [this message]
2021-03-27 17:10 ` Jeffrey Walton
2021-03-27 17:17 ` Philipp
2021-03-27 19:05 ` Andreas Schwab
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=9BE71EF8-F41A-4E65-B91C-1D36643791B9@gmail.com \
--to=p.stephani2@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=noloader@gmail.com \
/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.