2000-07-22 19:03:03 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* assert.h */
|
2000-07-22 19:03:03 +00:00
|
|
|
/* */
|
2013-05-09 11:56:54 +00:00
|
|
|
/* Diagnostics */
|
2000-07-22 19:03:03 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* */
|
2015-03-13 11:35:47 +00:00
|
|
|
/* (C) 1998-2015, Ullrich von Bassewitz */
|
2015-03-10 09:53:52 +00:00
|
|
|
/* Roemerstrasse 52 */
|
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
/* EMail: uz@cc65.org */
|
2000-07-22 19:03:03 +00:00
|
|
|
/* */
|
|
|
|
/* */
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
/* */
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
/* */
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
/* distribution. */
|
|
|
|
/* */
|
|
|
|
/*****************************************************************************/
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _ASSERT_H
|
|
|
|
#define _ASSERT_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef assert
|
|
|
|
#ifdef NDEBUG
|
|
|
|
# define assert(expr)
|
|
|
|
#else
|
2022-08-28 18:08:13 +00:00
|
|
|
extern void __fastcall__ __afailed (const char*, unsigned);
|
|
|
|
# define assert(expr) ((expr)? (void)0 : __afailed(__FILE__, __LINE__))
|
2000-05-28 13:40:48 +00:00
|
|
|
#endif
|
|
|
|
|
2020-08-21 19:15:19 +00:00
|
|
|
/* TODO: Guard with #if __CC65_STD__ >= __CC65_STD_C11__ if there
|
2020-07-26 20:16:47 +00:00
|
|
|
** is a C11 mode.
|
|
|
|
*/
|
2020-08-21 19:15:19 +00:00
|
|
|
#if __CC65_STD__ > __CC65_STD_C99__
|
|
|
|
# define static_assert _Static_assert
|
|
|
|
#endif
|
2020-07-26 20:16:47 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* End of assert.h */
|
|
|
|
#endif
|