gcov-io.c (GCOV_CHECK): Use gcc_assert when available.

* gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
	* gcov.c (abort): Remove undef.

From-SVN: r86781
This commit is contained in:
Nathan Sidwell 2004-08-30 15:52:09 +00:00 committed by Nathan Sidwell
parent 88d8c771f9
commit e044819338
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,8 @@
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.

View File

@ -547,10 +547,15 @@ GCOV_LINKAGE time_t gcov_time (void);
#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
#define GCOV_CHECK(expr)
/* Include EXPR, so that unused variable warnings do not occur. */
#define GCOV_CHECK(EXPR) ((void)(0 && (EXPR)))
#endif
#else
#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)

View File

@ -47,7 +47,6 @@ Boston, MA 02111-1307, USA. */
#include "tm.h"
#include "intl.h"
#include "version.h"
#undef abort
#include <getopt.h>