Type promotion bug?

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;
  }
}

More questions in this forum