HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
The compiler has detected conversion between pointers to data types having different sizes. This
usually happens when assigning an int pointer to a long pointer or vice versa. This is not a problem
in 32 bit mode since int, long and pointer all are of same size (32 bit) but in 64 bit mode int is
32 bit whereas long and pointer are 64 bit. Because of the difference in size in 64 bit mode this
conversion might lead to incorrect behavior in 64 bit mode.
Example:
void foo(long l) {
int i = l;
}
Action:
For 64 bit portability ensure that your code does not convert from pointer and long values to int.
Reference:
2.105 4230 64 bit migration: conversion from %t1 to %t2 may cause
target of pointers to have a different size.
Cause:
The compiler has detected conversion between pointers to data types having different sizes. This
usually happens when assigning an int pointer to a long pointer or vice versa. This is not a problem
in 32 bit mode since int, long and pointer all are of same size (32 bit) but in 64 bit mode int is
32 bit whereas long and pointer are 64 bit. Because of the difference in size in 64 bit mode this
conversion might lead to incorrect behavior in 64 bit mode.
Example:
long l = 1;
long *lptr = &l;
int *iptr = (int *)lptr;
Action:
For 64 bit portability ensure that your code does not convert from pointer to int to pointer to long
and vice versa.
Reference:
2.106 4231 64 bit migration: conversion between types of different sizes
has occurred (from %t1 to %t2 )
Cause:
The compiler has detected conversion between data types having different sizes. This usually
happens when converting from int data type to pointer or long data type and vice versa. This is
not a problem in 32 bit mode since int, long and pointer all are of same size (32 bit) but in 64
bit mode int is 32 bit whereas long and pointer are 64 bit. Because of the difference in size n 64
bit mode this conversion might lead to incorrect behavior in 64 bit mode.
Example:
void foo(int i) {
foo((void*)i);
return i;
}
Action:
54 Diagnostics Details