left shift count >= width of type with constant, compile-time expression

John Love-Jensen eljay@adobe.com
Tue May 2 14:13:00 GMT 2006

Hi Jim,

What happens if you try this:

#define CLKSRC_MASK(bits) ((((cycle_t)1)<<bits)-((cycle_t)1))

The way you had it, it was operating on an int, not on a cycle_t.  Hence,
integer overflow.


More information about the Gcc-help mailing list