a) C doesn't allow to cast pointers to integers v.v. etc. without going through a union;
That's not true unless you don't want to use type-casts.
char *foo; uint bar; foo = (char*)bar; bar = (uint)foo;
Gcc will warn if the sizes of "int" warn "char*" are not the same, which is easy to workaround with an additional typecast.
char *foo; /* assume 32-bit pointer */ uint64 bar; foo = (char*)(uint)bar; bar = (uint64)(uint)foo;
b) performance is king ;)
First make it run, then make it fast. It's a rare problem that requires the wrong results as fast as possible. :)
-- Parag
- To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message http://www.freiburg.linux.de/OpenBIOS/ - free your system..