Quote: "It depends what you're doing. Typecasting to a pointer doesn't cost anything. Casting between a float and another type requires a conversion, and casting to a larger variable requires a sign-extend/zero-extend (depending on the source variable)."
This is an EXCELLENT point I just kinda knew but SHOULD be pointed out. I usually do the casting you mentioned when it makes sense to cause a type conversion - however - my "Type Casting" and Pointer Math and crazy dereferencing I am always casting SAME SIZED types - int - pointer - 32bit.
Quote: "I wouldn't advise this practice either; if you store an address in a 32-bit variable then you won't ever be able to compile it as a 64-bit application"
Another good point! Personally I NEVER heed. I enjoy the POWER you can derive from a CPU by making use of the ENDIAN your developing in - 32 bit? then I'm 32 bit tricks all day long - and I know it won't compile on 64 bit and I don't care. Why? Am I Daft? Well Yes.. but that's not the point!
The reson is I have had to convert my own CODE libraries in the past - and at least when its my own code - and I know what and why I do certain things - I found in a day or two I could successfully convert 50,000 lines of code - because of the consistant patterns - careful frequent backups due to tons of global Search-n-Replaces and stuff.
I Think consistancy in development style is as important as everything else - makes life easier when there is a "system" or a recognizable pattern.