mirror of
https://github.com/simh/simh.git
synced 2026-02-15 12:17:32 +00:00
PDP11, PDP10, AltairZ80: Fixed cases where assert() macro is called with an expression which has side effects and therefore wouldn't get executed if compiled with NDEBUG defined.
This commit is contained in:
@@ -743,6 +743,12 @@ typedef struct sim_bitfield BITFIELD;
|
||||
#include "sim_timer.h"
|
||||
#include "sim_fio.h"
|
||||
|
||||
/* Macro to ALWAYS execute the specified expression and fail if it evaluates to false. */
|
||||
/* This replaces any references to "assert()" which should never be invoked */
|
||||
/* with an expression which causes side effects (i.e. must be executed for */
|
||||
/* the program to work correctly) */
|
||||
#define ASSURE(_Expression) if (_Expression) {fprintf(stderr, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); abort();} else (void)0
|
||||
|
||||
/* Asynch/Threaded I/O support */
|
||||
|
||||
#if defined (SIM_ASYNCH_IO)
|
||||
|
||||
Reference in New Issue
Block a user