[Bug c++/92659] Suggestions for bitshift

xry111 at mengyan1223 dot wang gcc-bugzilla@gcc.gnu.org
Tue Nov 26 12:59:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92659

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at mengyan1223 dot wang

--- Comment #1 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Is it appropriate?

Though on both 32-bit and 64-bit x86 "1ul" is good for a size_t, but I believe
there is some platform where "1ull" is necessary.

Maybe I'm wrong.  But if I'm correct, suggesting "1ul" is encouraging bad code.
 I'll use "(size_t) 1 << 32" for this.


More information about the Gcc-bugs mailing list