[PATCH] Small cleanups to cse.c
Eric Botcazou
ebotcazou@libertysurf.fr
Sat Nov 25 17:31:00 GMT 2006
> Well, not incorrect, just different. You'll find the form I suggested
> in a lot of places in GCC as well.
Then they should be corrected too. system.h is rather clear:
/* Use gcc_assert(EXPR) to test invariants. */
#if ENABLE_ASSERT_CHECKING
#define gcc_assert(EXPR) \
((void)(!(EXPR) ? fancy_abort (__FILE__, __LINE__, __FUNCTION__), 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() (fancy_abort (__FILE__, __LINE__, __FUNCTION__))
> This would also work, but in this form we wouldn't check that insn has
> the valid form if gcc is configured with assert checking disabled.
This is not supposed to happen by default, releases are configured with
--enable-checking=assert,runtime.
--
Eric Botcazou
More information about the Gcc-patches
mailing list