I'm using the unsigned long long type in gcc on solaris 2.5. When I turn on the -O2 flag some simple calculations fail. If I place a printf after the calculation it preforms correctly. Does anybody know why using the -O2 flag would cause the compiler to produce bad code for handling 64 bit numbers? thanks, aj