From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Newsgroups: gmane.emacs.devel Subject: Re: warning: unsequenced modification and access to 'sa_avail' Date: Sat, 27 Mar 2021 18:17:04 +0100 Message-ID: <9319961B-357B-4CC4-ADC9-1E4131BD5B43@gmail.com> References: <9BE71EF8-F41A-4E65-B91C-1D36643791B9@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9438"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: noloader@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 27 18:41:59 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQCwh-0002LA-6Z for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Mar 2021 18:41:59 +0100 Original-Received: from localhost ([::1]:45236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQCwg-0000Eq-6d for ged-emacs-devel@m.gmane-mx.org; Sat, 27 Mar 2021 13:41:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQCYh-0003lE-RK for emacs-devel@gnu.org; Sat, 27 Mar 2021 13:17:12 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:39526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQCYe-0002qT-Fa for emacs-devel@gnu.org; Sat, 27 Mar 2021 13:17:11 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id e18so8648531wrt.6 for ; Sat, 27 Mar 2021 10:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GRLX6TXeRUUkuuU2rT8fs1Xd91RsV16AqSn0cFu8MSE=; b=F7oVAY163Vp7kQTErWNz7+kmEE3sv+bfJcorIX5fLaDjLLvjRRV9FZLl0noIl1KG1v ke7vNJEu+4+gakrTifZ4pxcRg6c2aiUIzcgphDGJm7/oAT39MD4F219Rs6Wx+kgkN4Pr 5zynuJUIEVtkdpCJsjBBrPsInDk+tm1Ff9pWG4gfhs8gGs5Cf+SfR7lhJVf+V3WSbUp4 Z6KNZEftSpawbMoTLUE0Uf8jBjGk7DR/G4OD59Y7M4t8bDTO9FQF+GWoX5YJGnKCff9N Uhnq8HFF1BhMP4JVWa1mO5GW07VQCtARjUeWtHYrietenJlkBFxwRLoNbJsdldADSgF/ 0NSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GRLX6TXeRUUkuuU2rT8fs1Xd91RsV16AqSn0cFu8MSE=; b=n+S3sI7YggY6Ct3FZRWPuK2bYHF3Xd6VO93B+Ymimn5jXs3MWVEy5XsiYSb87SDOhM oXSAiQZuL4f2QdRNvzhM1y8h8gOgO4Y8IDUhFmjjyIL4hxAvDzCYPPYBe08ULJ9L80lf vBLm3f9CuyVUSjAo0UUSAOrLis3h9odBUwZ3Q57PycDF0mQHbObjhf2ZegQmp8Aakfkl GWdF9ma5RkjDrZl2VTg4ZauzS4Nsi/exWc3DxtB/Ntvs9QqrbPc08QtjFwLzLv2HIMEH m26kEkk9G+I3gNYl/1xTGWfckrDM5WyLLzRvnMu1tI1JfPMfZNDt3IJk5/BBS0dn3AuF fr5g== X-Gm-Message-State: AOAM530esJxBZC3EuRyaKtkT+WmUndyfOH4c42Uccx3+TgRQX1ge9F2V 7X5W2RWUXjzR7xq4bFPOhPk= X-Google-Smtp-Source: ABdhPJwL2pLWfk4bCrldpvfoKSFy4/HYqPvPpXXDAsWlwsikrECglroSkOtOdrQzWkIu9CPX+icKLw== X-Received: by 2002:a5d:49ca:: with SMTP id t10mr20305210wrs.76.1616865425804; Sat, 27 Mar 2021 10:17:05 -0700 (PDT) Original-Received: from philipps-macbook-pro.fritz.box (p57997c12.dip0.t-ipconnect.de. [87.153.124.18]) by smtp.gmail.com with ESMTPSA id n7sm14529216wrv.71.2021.03.27.10.17.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Mar 2021 10:17:05 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=p.stephani2@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267110 Archived-At: > Am 27.03.2021 um 18:10 schrieb Jeffrey Walton : >=20 > On Sat, Mar 27, 2021 at 1:01 PM Philipp wrote: >>=20 >>> Am 27.03.2021 um 17:05 schrieb Jeffrey Walton : >>>=20 >>> I'm building Emacs 27.2 on the Apple M1 machine. I think the = compiler >>> is complaining about undefined behavior: >>>=20 >>> sa_avail -=3D (size), alloca (size) >>>=20 >>> I think it is equivalent to something like this: >>>=20 >>> data[i] =3D data[i++]; >>>=20 >>> /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 =3D 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 -=3D (size), alloca (size)) >>> ^ >>>=20 >>=20 >> This has already been fixed by commit = 6a4ed891d84b1ca1e4d68a6de9dd374f1fadd971, which hasn't made it into the = release though. >=20 > Thanks Philipp. >=20 > Forgive my ignorance... Where is that commit? I can't seem to find it > at https://git.savannah.gnu.org/cgit/emacs.git/log/?h=3Demacs-27. > Searching the logs for your name, and searching for > 6a4ed891d84b1ca1e4d68a6de9dd374f1fadd971 (and 6a4ed891d84b) returns 0 > hits. >=20 Try 'git show 6a4ed891d84b1ca1e4d68a6de9dd374f1fadd971'. Right now it's = the ninth-most recent commit on the emacs-27 branch.