emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

warning: unsequenced modification and access to 'sa_avail'


From: Jeffrey Walton
Subject: warning: unsequenced modification and access to 'sa_avail'
Date: Sat, 27 Mar 2021 12:05:00 -0400

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

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]