diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 15:52:09 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 15:52:09 +0000 |
commit | 03b7130b9aa43ec8fbfbd2463c37797fcd1ab450 (patch) | |
tree | f7485dc2c31088e48c457cf49b8f1f236666d521 /gcc/gcov-io.h | |
parent | 2e818f508e564c53e9269ba6e3048c80f71be5a0 (diff) | |
download | gcc-03b7130b9aa43ec8fbfbd2463c37797fcd1ab450.tar.gz |
* gcov-io.c (GCOV_CHECK): Use gcc_assert when available.
* gcov.c (abort): Remove undef.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r-- | gcc/gcov-io.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 50eacccdc46..eaa23adcb47 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -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 +/* 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) |