X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c21493b89f5f5dd49e1f46d311326d5d4f49f8a4..f5d5ecdfaf97b891f6a634cc58817496a2e0faf8:/src/system.h diff --git a/src/system.h b/src/system.h index c1c45b49..63157904 100644 --- a/src/system.h +++ b/src/system.h @@ -64,8 +64,6 @@ typedef size_t uintptr_t; #endif -#include - #include #include @@ -94,8 +92,8 @@ char *base_name (char const *name); #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if !defined (__GNUC__) || __GNUC__ < 2 || \ -(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__) # define __attribute__(Spec) /* empty */ # endif #endif @@ -216,6 +214,11 @@ do { \ } while (0) +/* Assertions. 's assertions are too heavyweight, and can + be disabled too easily, so implement it separately here. */ +#define assert(x) ((void) ((x) || (abort (), 0))) + + /*---------------------------------------------. | Debugging memory allocation (must be last). | `---------------------------------------------*/