diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-03-24 14:09:06 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-03-24 14:09:06 +0000 |
commit | b53ef39560d2eed35fbeef8295687cac2eefabee (patch) | |
tree | 28f4fcc6528302933788606c837a86d7af18eb57 /gcc/tsystem.h | |
parent | 0a2198f5125444acabd8c7c0ef1afcd3842ae27c (diff) | |
download | gcc-b53ef39560d2eed35fbeef8295687cac2eefabee.tar.gz |
configure.ac (enable-checking): Add 'runtime' option.
* configure.ac (enable-checking): Add 'runtime' option.
* doc/install.texi (enable-checking): Document 'runtime' checking.
* tsystem.h (gcc_assert, gcc_unreachable): Define.
* config.in: Regenerated.
* configure: Regenerated.
From-SVN: r96990
Diffstat (limited to 'gcc/tsystem.h')
-rw-r--r-- | gcc/tsystem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tsystem.h b/gcc/tsystem.h index b2b95446c6f..5342178c414 100644 --- a/gcc/tsystem.h +++ b/gcc/tsystem.h @@ -121,4 +121,14 @@ extern int errno; #undef alloca #define alloca(x) __builtin_alloca(x) +#ifdef ENABLE_RUNTIME_CHECKING +#define gcc_assert(EXPR) ((void)(!(EXPR) ? abort (), 0 : 0)) +#else +/* Include EXPR, so that unused variable warnings do not occur. */ +#define gcc_assert(EXPR) ((void)(0 && (EXPR))) +#endif +/* Use gcc_unreachable() to mark unreachable locations (like an + unreachable default case of a switch. Do not use gcc_assert(0). */ +#define gcc_unreachable() (abort ()) + #endif /* ! GCC_TSYSTEM_H */ |