This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Could egcs warn at (int*)(int)(x)?
- To: egcs at cygnus dot com
- Subject: Could egcs warn at (int*)(int)(x)?
- From: Tobias Polzin <polzin00 at marvin dot informatik dot uni-dortmund dot de>
- Date: Mon, 15 Dec 1997 18:34:46 +0100
- Reply-To: egcs at cygnus dot com
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