Poisoned assert function needed in Python.h
Hi @karl-wette,
in the new-waveforms interface, we have embedded python to be able to call python models from C. We are currently testing a new build system and we are having some trouble fixing the CI pipeline (see MR https://git.ligo.org/waveforms/reviews/lalsuite/-/merge_requests/83). The main problem seems to be with the poisoning of the assert
macro, which is used in the embedded python of the new-interface.
The poisoning happens in lal/lib/std/LALStddef.h
/* forbid certain definitions in LAL code */
#if defined(LAL_STRICT_DEFS_ENABLED)
# if defined(__GNUC__)
/* assert() is often misused for error-checking code
which should never be disabled in production usage */
# pragma GCC poison assert
# endif
#endif
In this thread we have been discussing different workarounds, but the only one we see would work is not to poison the macro.
I would like to ask you if you think this is okay and if you know how relevant and necessary this poisoning is. Something I noticed is that the poisoning is only a problem for gcc above version 10 while for lower versions it isn't, not sure if that can tell something.