Grant> If so, then gcc or the code gen backend should generate a
    Grant> warning about overflowing the encoding.  This sounds like a
    Grant> toolchain bug.

gcc does generate a warning for constant shifts that are too big, as in:

        bit = 1ull << 64;

No diagnostic is generated when the shift is a variable, as in

        bit = 1ull << shift;

If at runtime, shift is bigger than the width of the unsigned long
long type, then this expression is undefined according to the C spec.
So the gcc behavior is perfectly correct.

 - R.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to