GNU bug report logs - #75451
scratch/igc: Enable CHECK_STRUCTS

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 9 Jan 2025 03:58:02 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #67 received at 75451 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>,
 Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Pip Cet <pipcet <at> protonmail.com>, Gerd Moellmann <gerd <at> gnu.org>,
 75451 <at> debbugs.gnu.org
Subject: Re: bug#75451: scratch/igc: Enable CHECK_STRUCTS
Date: Sun, 19 Jan 2025 20:01:31 -0600
[Message part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> Yes, inserting 'default: emacs_abort ();' switches from static to
> dynamic checking, which is less reliable. Although 'default: emacs_abort
> ();' is sometimes the best one can do, it's better to avoid it when
> possible.
>
> I use 'default: eassume (false);' more often than 'default: emacs_abort
> ();', though for a completely different purpose: to tell GCC something
> that it's not smart enough to figure out on its own, so that GCC can do
> better static checking elsewhere.

Thanks, that's helpful.  Based on the above, I came up with the attached
patch for pdumper.c.

But could you explain your last paragraph above?  In my attached patch,
there is one removal of 'default: eassume(false)'; how can I know if
it's worth keeping or not?
[0001-Prefer-static-switch-case-checks-in-pdumper.patch (text/x-patch, attachment)]

This bug report was last modified 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.