[Bf-committers] Sharp/Flat selections

Ken Hughes khughes at pacific.edu
Wed Dec 28 21:53:13 CET 2005


Tom M wrote:
>>One thing I don't like about this code (and this certainly
>>isn't the only place in the code this happens), is that
>>it uses the fact that the (short int) edge flags eed->f1
>>and eed->f2 are consecutive, and casts that storage to
>>be a long int.
> 
> 
> Is that safe for 64 bit systems too?  Also are compilers allowed to
> reorder stuff in structs at high optimization levels?  Also would
> making it a true long int and having the old f1 and f2 accessed via a
> bitmask method work?

It would be problematic on 64-bit machines anyway. Isn't a short int 
should 16-bits but on 64-bit machines (except WinXP) a long would be 
64-bits?  Or is a long int the same as an int?

Ken


More information about the Bf-committers mailing list