(all insn and peephole patterns): Rewrite without using arm_output_asm_insn.
[official-gcc.git] / gcc / assert.h
blob4efbab963672d9fa7fa8f374c5dead98264af8bd
1 /* Allow this file to be included multiple times
2 with different settings of NDEBUG. */
3 #undef assert
4 #undef __assert
6 #ifdef NDEBUG
7 #define assert(ignore) ((void) 0)
8 #else
10 #ifndef __GNUC__
12 #define assert(expression) \
13 ((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
15 #define __assert(expression, file, lineno) \
16 (printf ("%s:%u: failed assertion\n", file, lineno), \
17 abort (), 0)
19 #else
21 #if defined(__STDC__) || defined (__cplusplus)
23 /* Defined in libgcc.a */
24 #ifdef __cplusplus
25 extern "C" {
26 extern void __eprintf (const char *, const char *, unsigned, const char *);
28 #else
29 extern void __eprintf (const char *, const char *, unsigned, const char *);
30 #endif
32 #define assert(expression) \
33 ((void) ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__)))
35 #define __assert(expression, file, line) \
36 (__eprintf ("%s:%u: failed assertion `%s'\n", \
37 file, line, expression), 0)
39 #else /* no __STDC__ and not C++; i.e. -traditional. */
41 extern void __eprintf (); /* Defined in libgcc.a */
43 #define assert(expression) \
44 ((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
46 #define __assert(expression, file, lineno) \
47 (__eprintf ("%s:%u: failed assertion `%s'\n", \
48 file, lineno, "expression"), 0)
50 #endif /* no __STDC__ and not C++; i.e. -traditional. */
51 #endif /* no __GNU__; i.e., /bin/cc. */
52 #endif