https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118033
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- First of all, assert.h is part of glibc (or other C libraries), not gcc. And, at least C23 clearly defines that when NDEBUG is defined, it is #define assert(...) ((void)0) So, if one does #define NDEBUG #include <assert.h> one can use assert() or assert (1, 2, 3) or assert (////). So, defining assert in that case to something that would require a single argument is not conforming. You can use [[assume (cond)]]; in your code instead etc., or use different macros (e.g. your own) which could be defined to assert #ifndef NDEBUG and to something else otherwise...