From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: ./configure --enable-check-lisp-object-type Date: Tue, 12 Apr 2022 20:43:29 +0300 Message-ID: <83o81642pq.fsf@gnu.org> References: <878rsack6p.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30665"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 12 19:44:59 2022 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 1neKZW-0007oN-PH for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Apr 2022 19:44:58 +0200 Original-Received: from localhost ([::1]:51112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neKZV-0007VE-Bu for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Apr 2022 13:44:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neKY2-0006iv-DV for emacs-devel@gnu.org; Tue, 12 Apr 2022 13:43:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neKY1-0001zR-3e; Tue, 12 Apr 2022 13:43:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=khGrAuWnnEFHcjCDX7APSgrlCZiFwZG5oX61ngL4SWk=; b=q7T4No4ynJIG1iR9XicD QNortFEsfNAx5acANInTC7dDfDirvrsBvdB3Skb/toNPOEh3ORi336g9m0ltbcED/08TN9BBExTN+ E6PThx7bq7y+Zg+3qFkKHunkc+/OQHaHbaDR25tfSjM7Jw6JJkIHuuESnpZnsVmi7ASuzeE09EQli i80PX8tvLa16RHiIeSU20/4o82te2+wa+hdkI9YH1cFkt7W9FwNjhRFLUNGuWDClzf0yQ0PWujSsS Ihmj6E8SzLyVOkVRnWN64L7ycjdUkkIP+gg2vuAi6JHixj3lnnUUEwToF8nZR+b6QkyrK2Rpf01+o OVijZo7pZHQlRA==; Original-Received: from [87.69.77.57] (port=3682 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neKY0-0002aG-J3; Tue, 12 Apr 2022 13:43:24 -0400 In-Reply-To: (message from Stefan Monnier on Tue, 12 Apr 2022 13:23:21 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:288325 Archived-At: > From: Stefan Monnier > Cc: "emacs-devel@gnu.org" > Date: Tue, 12 Apr 2022 13:23:21 -0400 > > > For the first time in a while I enabled the Lisp object type, and I was > > given a wall of > > I've been using it for many many years. > > > dispnew.c:6593:1: note: in expansion of macro ‘DEFUN’ > > 6593 | DEFUN ("internal-show-cursor-p", Finternal_show_cursor_p, > > | ^~~~~ > > lisp.h:3179:5: warning: missing braces around initializer [-Wmissing-braces] > > 3179 | {{{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ > > | ^ > > > > for every DEFUN. That's new, isn't it? (This is on Debian/bookworm.) > > Yes, it's new enough that I haven't reported it yet. The last change there was done 2 years ago, if my Git forensics are correct. So I wonder what exactly happened recently that started triggering this. > > #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ > > SUBR_SECTION_ATTRIBUTE \ > > static union Aligned_Lisp_Subr sname = \ > > {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ > > { .a ## maxargs = fnname }, \ > > minargs, maxargs, lname, {intspec}, 0}}; \ > > Lisp_Object fnname > > > > That seems like beaucoup de braces, so is that a gcc bug or something? > > (Adding more braces makes compilation fail.) > > I don't know the syntax of C initializers well enough to judge, but > I wasn't able to silence the warning by tweaking the code, so far. I believe the problem is this: static union Aligned_Lisp_Subr sname = \ {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ { .a ## maxargs = fnname }, \ minargs, maxargs, lname, {intspec}, 0}}; \ ^ That zero corresponds to the 'Lisp_Object command_modes' member of Aligned_Lisp_Subr, and in a build with --enable-check-lisp-object-type a Lisp_Object is a struct, so it must be initialized with {0}, not just a scalar zero. This is what we had before April 2020, when Andrea removed the braces around the zero in commit d73e6407. Andrea, can you tell why this was done? I don't think I understand how the intent of that changeset justifies the removal.