X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f16b08196c780556cbf50691e2944960aebc46f6..f39ab2869cae648b37bd954fedd99dab8d79ce9f:/src/system.h diff --git a/src/system.h b/src/system.h index 57a432d0..c5a685bc 100644 --- a/src/system.h +++ b/src/system.h @@ -1,7 +1,6 @@ /* System-dependent definitions for Bison. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free - Software Foundation, Inc. + Copyright (C) 2000-2007, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,14 +122,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 /*-----------.