Annotation of gcc/assert.h, revision 1.1.1.3

1.1       root        1: /* Allow this file to be included multiple times
                      2:    with different settings of NDEBUG.  */
                      3: #undef assert
                      4: #undef __assert
                      5: 
                      6: #ifdef NDEBUG
                      7: #define assert(ignore) ((void) 0)
                      8: #else
                      9: 
                     10: #ifndef __GNUC__
                     11: 
                     12: #define assert(expression)  \
                     13:   ((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
                     14: 
                     15: #define __assert(expression, file, lineno)  \
1.1.1.2   root       16:   (printf ("%s:%u: failed assertion\n", file, lineno), \
1.1       root       17:    abort (), 0)
                     18: 
                     19: #else
                     20: 
1.1.1.2   root       21: #if defined(__STDC__) || defined (__cplusplus)
1.1       root       22: 
                     23: /* Defined in libgcc.a */
1.1.1.2   root       24: #ifdef __cplusplus
                     25: extern "C" {
1.1.1.3 ! root       26: extern void __eprintf (const char *, const char *, unsigned, const char *);
1.1.1.2   root       27: }
                     28: #else
1.1.1.3 ! root       29: extern void __eprintf (const char *, const char *, unsigned, const char *);
1.1.1.2   root       30: #endif
1.1       root       31: 
                     32: #define assert(expression)  \
                     33:   ((void) ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__)))
                     34: 
                     35: #define __assert(expression, file, line)  \
1.1.1.2   root       36:   (__eprintf ("%s:%u: failed assertion `%s'\n",                \
1.1       root       37:              file, line, expression), 0)
                     38: 
1.1.1.2   root       39: #else /* no __STDC__ and not C++; i.e. -traditional.  */
1.1       root       40: 
                     41: extern void __eprintf (); /* Defined in libgcc.a */
                     42: 
                     43: #define assert(expression)  \
                     44:   ((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
                     45: 
                     46: #define __assert(expression, file, lineno)  \
1.1.1.2   root       47:   (__eprintf ("%s:%u: failed assertion `%s'\n",                \
1.1       root       48:              file, lineno, "expression"), 0)
                     49: 
1.1.1.2   root       50: #endif /* no __STDC__ and not C++; i.e. -traditional.  */
1.1       root       51: #endif /* no __GNU__; i.e., /bin/cc.  */
                     52: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.