This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc_assert
- From: Ian Lance Taylor <iant at google dot com>
- To: ranjith kumar <ranjit_kumar_b4u at yahoo dot co dot uk>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 08 Jun 2007 10:26:31 -0700
- Subject: Re: gcc_assert
- References: <214031.41387.qm@web27404.mail.ukl.yahoo.com>
ranjith kumar <ranjit_kumar_b4u@yahoo.co.uk> writes:
> What is the purpose of gcc_assert() function?
> Any resource please.
>
>
> 574 #define gcc_assert(EXPR)
> \
> 575 ((void)(!(EXPR) ? fancy_abort (__FILE__,
> __LINE__, __FUNCTION__), 0 : 0))
> 576 #else
> 577 /* Include EXPR, so that unused variable
> warnings do not occur. */
> 578 #define gcc_assert(EXPR) ((void)(0 && (EXPR)))
> 579 #endif
It's a version of the standard assert function used in the gcc
sources. For gcc's purposes it is better than assert because dumping
core is under the control of the -dH option.
Ian