------- Comment #9 from pinskia at gcc dot gnu dot org 2009-10-23 02:53 -------
> unsigned long long a:2; > unsigned long long b:40; > unsigned long long c:22; > unsigned long long a = t.a - 8; t.a gets promoted to in as t.a is less precision than int. Which causes a sign extend to happen and then converted into unsigned long long which causes another sign extend. > unsigned long long b = t.b - 8; t.b has more precision than int so it does not get change and then it gets promoted to unsigned long long. > unsigned long long c = t.c - 8; t.c is the same as t.a. If you used 8u then it would have been converted into unsigned int rather than int and become the same. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41793