diff options
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index e0f6001c195..7f42d061ab1 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -33,9 +33,6 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "defaults.h" -/* #define NDEBUG 1 */ -#include "assert.h" - #if defined(DWARF_TIMESTAMPS) #if defined(POSIX) #include <time.h> @@ -61,6 +58,15 @@ extern time_t time (); #endif #endif +/* We cannot use <assert.h> in GCC source, since that would include + GCC's assert.h, which may not be compatible with the host compiler. */ +#undef assert +#ifdef NDEBUG +# define assert(e) +#else +# define assert(e) do { if (! (e)) abort (); } while (0) +#endif + extern char *getpwd (); #ifdef NEED_DECLARATION_INDEX |