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.bugs Subject: bug#45246: 28.0.50; etags assertion error Date: Thu, 09 Jun 2022 20:42:41 +0300 Message-ID: <83zgil20oe.fsf@gnu.org> References: <87k0tklzzz.fsf@no.workgroup> <87o7z4k8ob.fsf@gnus.org> <87a6ao7dnh.fsf@no.workgroup> <838rq879ey.fsf@gnu.org> <83y1y85rko.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30177"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45246@debbugs.gnu.org To: grfz@gmx.de, larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 20:42:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nzN76-0007ff-Lr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 20:42:36 +0200 Original-Received: from localhost ([::1]:36446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzN75-0000d3-L8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 14:42:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzMBS-0003so-UA for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 13:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzMBS-0006vK-KL for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzMBS-0006w9-G6 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 13:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45246 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45246-submit@debbugs.gnu.org id=B45246.165479657326649 (code B ref 45246); Thu, 09 Jun 2022 17:43:02 +0000 Original-Received: (at 45246) by debbugs.gnu.org; 9 Jun 2022 17:42:53 +0000 Original-Received: from localhost ([127.0.0.1]:47676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzMBJ-0006vl-FN for submit@debbugs.gnu.org; Thu, 09 Jun 2022 13:42:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzMBH-0006vY-C6 for 45246@debbugs.gnu.org; Thu, 09 Jun 2022 13:42:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzMBB-0006ul-F8; Thu, 09 Jun 2022 13:42:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oLyqAjeduapIS9VtSmk5bRrwa1yCASkEkjrVh8LG0PA=; b=HFBTPq7v5CMd XODr3E5S7Z+PvfX9jgDASGf3z2472q3bhWIp5d2BLKWKW6yEX4FmxlxcyNTvonwsgSxdTFmJzRz16 uG2KaJ6g5e704TBL3rs5ftb+80pEEFyErdQt0j8fJ7blkl4vNHPwzj1Q4H3/oAS1oM/nR/ItDQPIt HCs6QuPJ2Veqi5yzt62DPcV8a9cMvwfbHUHuUjhoXV9V3fB/rhcHcwl7eONPNRbWcOYVy1t4s2G8j KZYA9df0k5XrouOkwRkZ3sGLkjRvbhDO8IfpqRgegnvPLq3xrD5AEjiLIs31M4x/BXhF2HvwwySUs 0ShqPP7B36PTpad0hCt+uQ==; Original-Received: from [87.69.77.57] (port=3296 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 1nzMBA-000841-91; Thu, 09 Jun 2022 13:42:44 -0400 In-Reply-To: <83y1y85rko.fsf@gnu.org> (message from Eli Zaretskii on Tue, 07 Jun 2022 20:08:55 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234144 Archived-At: > Date: Tue, 07 Jun 2022 20:08:55 +0300 > From: Eli Zaretskii > Cc: grfz@gmx.de, larsi@gnus.org, 45246@debbugs.gnu.org > > > Cc: larsi@gnus.org, 45246@debbugs.gnu.org > > Date: Tue, 07 Jun 2022 18:58:13 +0300 > > From: Eli Zaretskii > > > > > $ /home/grfz/src/emacs/lib-src/etags /usr/include/xapian/unicode.h > > > etags: etags.c:4188: C_entries: Assertion `bracelev == typdefbracelev' failed. > > > Aborted > > > > Lars, I guess you were trying this in an optimized build, where all > > the assertions compile to nothing. > > > > I see this here and will try to take a look when I have time. > > A much smaller test case: > > namespace Unicode { > > typedef enum { > UNASSIGNED, > OTHER_SYMBOL > } category; > > } > > Hmm... Heh, turns out it's a "feature": when etags sees a closing brace in column zero, it by default assumes that's the final brace of a function or a struct definition, so it resets the brace level. As you can see, the above test case (and the original Unicode.h) have the closing brace of the "typedef enum" in column zero. If you mark the entire typedef and type "M-C-\", Emacs will indent it, and the problem will go away. "etags --help" says: -I, --ignore-indentation In C and C++ do not assume that a closing brace in the first column is the final brace of a function or structure definition. And indeed, invoking "etags -I" compiled with --enable-checking with the original file avoids the assertion violation. And in a production build, etags produces a valid TAGS file even if -I is omitted. So I think there's nothing to do here, and we should close this bug as notabug. Does anyone disagree?