summaryrefslogtreecommitdiff
path: root/include/assert.h
blob: 49550e398bea51e16ea659942119c4a992897601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef __ASSERT_H
#define __ASSERT_H

#ifdef NDEBUG
#define assert(ignore) ((void)0)
#else

#define assert(__expr) ((__expr) ? (void)0 : __assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, #__expr))
#endif

_Noreturn void __assert(const char *_Nonnull __file, int __line, const char *_Nonnull __func,
			const char *_Nonnull __expr);

#endif