Mercurial > hg > xemacs-beta
comparison src/bytecode.c @ 4974:fe0d3106cc36
fix compile problems in bytecode.c when no error-check-byte-code (issue 666)
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-05 Ben Wing <ben@xemacs.org>
* bytecode.c (bytecode_assert):
Use 0 instead of x in disabled_assert calls to avoid errors due
to using undefined vars/params (they are defined only when
ERROR_CHECK_BYTE_CODE, which also turns on/off the asserts).
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Feb 2010 04:07:47 -0600 |
parents | 5c89ceb69819 |
children | 99f8ebc082d9 ed624ab64583 b5df3737028a |
comparison
equal
deleted
inserted
replaced
4970:5c89ceb69819 | 4974:fe0d3106cc36 |
---|---|
119 const Opbyte *program_ptr, | 119 const Opbyte *program_ptr, |
120 Opcode opcode); | 120 Opcode opcode); |
121 | 121 |
122 #ifndef ERROR_CHECK_BYTE_CODE | 122 #ifndef ERROR_CHECK_BYTE_CODE |
123 | 123 |
124 # define bytecode_assert(x) disabled_assert (x) | 124 /* Normally we would use `x' instead of `0' in the argument list, to avoid |
125 # define bytecode_assert_with_message(x, msg) disabled_assert(x) | 125 problems if `x' (an expression) has side effects, and warnings if `x' |
126 contains variables or parameters that are otherwise unused. But in | |
127 this case `x' contains references to vars and params that exist only | |
128 when ERROR_CHECK_BYTE_CODE, and leaving in `x' would result in compile | |
129 errors. */ | |
130 # define bytecode_assert(x) disabled_assert (0) | |
131 # define bytecode_assert_with_message(x, msg) disabled_assert(0) | |
126 # define bytecode_abort_with_message(msg) abort_with_message (msg) | 132 # define bytecode_abort_with_message(msg) abort_with_message (msg) |
127 | 133 |
128 #else /* ERROR_CHECK_BYTE_CODE */ | 134 #else /* ERROR_CHECK_BYTE_CODE */ |
129 | 135 |
130 # define bytecode_assert(x) \ | 136 # define bytecode_assert(x) \ |