/*
# gcc handle_cast.c -o handle_cast
handle_cast.c: In function 'main':
handle_cast.c:25: warning: assignment from incompatible pointer type

# g++ handle_cast.c -o handle_cast
handle_cast.c: In function 'int main()':
handle_cast.c:25: error: cannot convert '<anonymous struct>*' to '<anonymous struct>*' in assignment
*/

typedef struct { int unused; } * handle_type1;
typedef struct { int unused; } * handle_type2;

typedef void * handle_type3;
typedef void * handle_type4;

int main()
{
  handle_type1 p1;
  handle_type2 p2;
  handle_type3 p3;
  handle_type4 p4;

  p4 = p3;                      /* "correct" */
  p2 = p1;                      /* warning/error */
}

