From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Pip Cet <pipcet@protonmail.com>
Cc: emacs-devel@gnu.org, "Gerd M�llmann" <gerd@gnu.org>
Subject: Re: scratch/igc 3f46110b878: Fix an eassert
Date: Wed, 11 Dec 2024 16:36:02 +0100 [thread overview]
Message-ID: <m28qsmqljx.fsf@gmail.com> (raw)
In-Reply-To: <8734iul0j5.fsf@protonmail.com> (Pip Cet's message of "Wed, 11 Dec 2024 15:09:47 +0000")
Pip Cet <pipcet@protonmail.com> writes:
> "Gerd Moellmann" <gerd@gnu.org> writes:
>
>> branch: scratch/igc
>> commit 3f46110b878ef0940ad7c0a9eacd6ef441baad7d
>> Author: Gerd Möllmann <gerd@gnu.org>
>> Commit: Gerd Möllmann <gerd@gnu.org>
>>
>> Fix an eassert
>> ---
>> src/igc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/igc.c b/src/igc.c
>> index b1ef6939b5f..2ce508e055e 100644
>> --- a/src/igc.c
>> +++ b/src/igc.c
>> @@ -2223,7 +2223,7 @@ fix_weak_hash_table_weak_part (mps_ss_t ss, struct Lisp_Weak_Hash_Table_Weak_Par
>> for (ssize_t i = 0; i < limit; i++)
>> {
>> if (w->entries[i].intptr & 1)
>> - eassert ((mps_word_t)w->entries[i].intptr ^ w->entries[i].intptr == 0);
>> + eassert ((mps_word_t)w->entries[i].intptr ^ (w->entries[i].intptr == 0));
>> bool was_nil = (w->entries[i].intptr) == 0;
>> intptr_t off = 0;
>> #ifdef WORDS_BIGENDIAN
>
> I'm guessing I'm failing a basic C knowledge test here, but can you
> explain? Did you run into an assertion error with the old code, or a
> compiler warning?
It was a warning from clang. So the right thing would be (x ^ y) == 0?
next prev parent reply other threads:[~2024-12-11 15:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <173392893159.259533.15506246926795870751@vcs3.savannah.gnu.org>
[not found] ` <20241211145532.114DD65A960@vcs3.savannah.gnu.org>
2024-12-11 15:09 ` scratch/igc 3f46110b878: Fix an eassert Pip Cet via Emacs development discussions.
2024-12-11 15:36 ` Gerd Möllmann [this message]
2024-12-11 15:40 ` Gerd Möllmann
2024-12-11 15:55 ` Gerd Möllmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m28qsmqljx.fsf@gmail.com \
--to=gerd.moellmann@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=gerd@gnu.org \
--cc=pipcet@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.