ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since f980549 was
d6c1dd0,
checked in by Peter A. Buhr <pabuhr@…>, 7 years ago
|
formatting and add attribute "format" to C++ assert_fail_f
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[a922e34] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
[ed0e67a] | 7 | // assert.h -- |
---|
[a922e34] | 8 | // |
---|
| 9 | // Author : Peter A. Buhr |
---|
| 10 | // Created On : Mon Jul 4 23:25:26 2016 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[d6c1dd0] | 12 | // Last Modified On : Mon Jul 31 23:09:32 2017 |
---|
| 13 | // Update Count : 13 |
---|
[a922e34] | 14 | // |
---|
| 15 | |
---|
[d9c44c3] | 16 | #ifdef __CFORALL__ |
---|
[a922e34] | 17 | extern "C" { |
---|
[d9c44c3] | 18 | #endif //__CFORALL__ |
---|
| 19 | |
---|
| 20 | #include_next <assert.h> |
---|
| 21 | |
---|
[dfa66dc] | 22 | #ifdef NDEBUG |
---|
[921fe6a] | 23 | #define assertf( expr, fmt, ... ) ((void)0) |
---|
[dfa66dc] | 24 | #else |
---|
| 25 | #define __STRINGIFY__(str) #str |
---|
| 26 | #define __VSTRINGIFY__(str) __STRINGIFY__(str) |
---|
[d6c1dd0] | 27 | #define assertf( expr, fmt, ... ) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ )) |
---|
| 28 | |
---|
| 29 | void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn, format( printf, 5, 6) )); |
---|
[dfa66dc] | 30 | #endif |
---|
| 31 | |
---|
[d9c44c3] | 32 | #ifdef __CFORALL__ |
---|
[a922e34] | 33 | } // extern "C" |
---|
[d9c44c3] | 34 | #endif //__CFORALL__ |
---|
[a922e34] | 35 | |
---|
| 36 | // Local Variables: // |
---|
| 37 | // tab-width: 4 // |
---|
| 38 | // mode: c++ // |
---|
| 39 | // compile-command: "make install" // |
---|
| 40 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.