Specific pointer -> generic pointer -> boolean (i.e. implicit compare to 0) seems not to work as expected.
void main() { char* p; char* q; char xdata* xp = NULL; bit fail = FALSE; // This fails. if ( p = xp ) { fail = TRUE; } // This is ok. if ( ( q = xp ) == NULL ) { fail = TRUE; } }
It would be worth you taking a look here: http://www.keil.com/update/_docs/releasenotes/c51v709.htm as there have been a number of bug fixes throughout version 7.x releases relating to comparisons between generic/far pointers and NULL. Stefan