source: doc/theses/thierry_delisle_PhD/code/assert.hpp @ b2a37b0

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since b2a37b0 was b2a37b0, checked in by Thierry Delisle <tdelisle@…>, 5 years ago

Initial drafts in C++ of the CFA scheduler

  • Property mode set to 100644
File size: 490 bytes
Line 
1#pragma once
2
3#include <cassert>
4#include <cstdlib>
5
6#define sstr(s) #s
7#define xstr(s) sstr(s)
8
9extern const char * __my_progname;
10
11#define assertf(cond, ...) ({             \
12        if(!(cond)) {                       \
13                fprintf(stderr, "%s: " __FILE__ ":" xstr(__LINE__) ": %s: Assertion '" xstr(cond) "' failed.\n", __my_progname, __PRETTY_FUNCTION__); \
14                fprintf(stderr, __VA_ARGS__); \
15                fprintf(stderr, "\n"); \
16                std::abort();                 \
17        }                                   \
18})
Note: See TracBrowser for help on using the repository browser.