This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Could egcs warn at (int*)(int)(x)?


I had problems with porting a software package to a 64 bit architecture.
After exhausting debugging-sessions I found that the problem were "pointer->
int->pointer"-casts which loose the upper 32 bit of the address. 
The usual warnings (-wAll -Wconversion -Wpointer-arith) do not detect
this porblems.

Is there any possibility to get warnings for things like:
   int* foo=(int*)((int)bar + delta);
Or even for
   int  delta= long(newaddress)-long(oldaddress).

Tobias "2b" Polzin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]