www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - unexpected warning

reply Frank Benoit <frank_DELETE_ _DELETE_drealtime.com> writes:
with dmd 0.141 and "-w"

int main()
{
  // no warning
  bit a1 = (( 1 & 3 ) != 0 );
  
  // warning: implicit conversion of 
  // expression (i & 3 != 0) of type int 
  // to bit can cause loss of data
  int i = 1;
  bit a2 = (( i & 3 ) != 0 );
  return 0;
}

Frank
Jan 01 2006
parent Frank Benoit <frank_DELETE_ _DELETE_drealtime.com> writes:
Sorry I noticed the "bool bugs" thread too late.

Frank
Jan 01 2006