Re: gcc_assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ranjith kumar <ranjit_kumar_b4u@xxxxxxxxxxx> 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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux