[PATCH] rs6000: Use ULL on big hexadecimal literal

Segher Boessenkool segher@kernel.crashing.org
Wed Nov 13 10:57:00 GMT 2019


On Wed, Nov 13, 2019 at 09:15:38AM +0100, Richard Henderson wrote:
> On 11/12/19 10:52 PM, Segher Boessenkool wrote:
> > C++98 does not have long long int, and does not use (unsigned) long
> > long int for hexadecimal literals.  So let's use an ULL suffix here,
> > which is still not strict C++98, but which works with more compilers.
> 
> Isn't that what HOST_WIDE_INT_UC() is for?
> Of course, that will use either UL or ULL itself...

HOST_WIDE_INT_UC doesn't exactly make the code more readable, IMO.

It is passed here directly to GEN_INT, so as long as the suffix makes it
a big enough type all is well.  There are many occurrences of this in
the tree already, including another in this same file.

Soon we will require C++11 and we won't need any suffixes on hexadecimal
literals anymore, in all common cases (all sane cases one could say).
So we don't have to discuss this anymore :-)


Segher



More information about the Gcc-patches mailing list