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 | |
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
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/gcov-io.h | 9 | ||||
-rw-r--r-- | gcc/gcov.c | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3bf8503f499..fdd8639121f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. 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) diff --git a/gcc/gcov.c b/gcc/gcov.c index 0e6a6f8de49..83515967cdd 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -47,7 +47,6 @@ Boston, MA 02111-1307, USA. */ #include "tm.h" #include "intl.h" #include "version.h" -#undef abort #include <getopt.h> |