* gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
* gcov.c (abort): Remove undef.
From-SVN: r86781
2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
+ * gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
+ * gcov.c (abort): Remove undef.
+
* tree.h (BINFO_PRIMARY_BASE_OF): Remove.
(struct tree_binfo): Remove primary field.
#endif
/* Make sure the library is used correctly. */
+#if IN_LIBGCOV
#if ENABLE_CHECKING
-#define GCOV_CHECK(expr) ((expr) ? (void)0 : (void)abort ())
+#define GCOV_CHECK(EXPR) (!(EXPR) ? abort (), 0 : 0)
+#else
+/* Include EXPR, so that unused variable warnings do not occur. */
+#define GCOV_CHECK(EXPR) ((void)(0 && (EXPR)))
+#endif
#else
-#define GCOV_CHECK(expr)
+#define GCOV_CHECK(EXPR) gcc_assert (EXPR)
#endif
#define GCOV_CHECK_READING() GCOV_CHECK(gcov_var.mode > 0)
#define GCOV_CHECK_WRITING() GCOV_CHECK(gcov_var.mode < 0)
#include "tm.h"
#include "intl.h"
#include "version.h"
-#undef abort
#include <getopt.h>