X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/38609c34559fb86f2fb827dfed929ba9c396dc6f..a93cdd3d67b29a2eea2d461bf566d8d60aecc7e9:/src/system.h diff --git a/src/system.h b/src/system.h index cc2b09b2..8d2358c2 100644 --- a/src/system.h +++ b/src/system.h @@ -123,14 +123,26 @@ typedef size_t uintptr_t; | Assertions. | `-------------*/ -/* 's assertions are too heavyweight, and can be disabled - too easily, so use aver rather than assert. */ -static inline void -aver (bool assertion) -{ - if (! assertion) - abort (); -} +/* In the past, Bison defined aver to simply invoke abort in the case of + a failed assertion. The rationale was that 's assertions + were too heavyweight and could be disabled too easily. See + discussions at + + . + + However, normal assert output can be helpful during development and + in bug reports from users. Moreover, it's not clear now that + 's assertions are significantly heavyweight. Finally, if + users want to experiment with disabling assertions, it's debatable + whether it's our responsibility to stop them. See discussion + starting at + . + + For now, we use assert but we call it aver throughout Bison in case + we later wish to try another scheme. +*/ +#include +#define aver assert /*-----------.