# HG changeset patch # User Ben Wing # Date 1265367883 21600 # Node ID f48bf636045f2661d32e95ff7687a28d8be832dc # Parent 2bf7c51d71016b08f787cebc947a0fe3ce8f649b# Parent c5cb3cb7911064305537c8967797245227041a4b Automatic merge diff -r 2bf7c51d7101 -r f48bf636045f src/ChangeLog --- a/src/ChangeLog Fri Feb 05 04:28:08 2010 -0600 +++ b/src/ChangeLog Fri Feb 05 05:04:43 2010 -0600 @@ -1,3 +1,10 @@ +2010-02-05 Ben Wing + + * 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). + 2010-02-04 Ben Wing * alloc.c (release_breathing_space): diff -r 2bf7c51d7101 -r f48bf636045f src/bytecode.c --- a/src/bytecode.c Fri Feb 05 04:28:08 2010 -0600 +++ b/src/bytecode.c Fri Feb 05 05:04:43 2010 -0600 @@ -121,8 +121,14 @@ #ifndef ERROR_CHECK_BYTE_CODE -# define bytecode_assert(x) disabled_assert (x) -# define bytecode_assert_with_message(x, msg) disabled_assert(x) +/* Normally we would use `x' instead of `0' in the argument list, to avoid + problems if `x' (an expression) has side effects, and warnings if `x' + contains variables or parameters that are otherwise unused. But in + this case `x' contains references to vars and params that exist only + when ERROR_CHECK_BYTE_CODE, and leaving in `x' would result in compile + errors. */ +# define bytecode_assert(x) disabled_assert (0) +# define bytecode_assert_with_message(x, msg) disabled_assert(0) # define bytecode_abort_with_message(msg) abort_with_message (msg) #else /* ERROR_CHECK_BYTE_CODE */