[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH COMMITTED] src: Fix NDEBUG compilation: avoid side-effects in
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH COMMITTED] src: Fix NDEBUG compilation: avoid side-effects in assert |
Date: |
Thu, 27 Feb 2020 09:39:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
on a related note: how about re-defining `assert` to `(void)(cond)` for
NDEBUG builds, so that we don't get a plethora of unused variable
warnings now?
Hm, is that common practice? It seems to me that if a given variable is
only used in an assert, we probably want to identify it so we can
rewrite the code to avoid that situation.
Also, are NDEBUG builds actually a good idea? I recall that when fuzzing
poke a lot of "crashes" that I found were just failed assertions. So
maybe we should refrain from supporting NDEBUG builds for now?
Well, we are not "supporting" NDEBUG, meaning no build mode of poke
AC_DEFINEs NDEBUG.