This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I myself would want "(n >> 32)" to produce the same result as "((n >> 16)to be generally agreed that the compiler would be at liberty to so do if it16)" and indeed "for (int i = 32; i > 0; i--, n >>= 1) ;", and it seems
wants to.
But you could never depend on it. If it only works when the shift count is a constant, a failure to do constant folding would break it.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |