Re: __builtin_clzll and uintmax_t

2011-03-08 Thread Joern Rennecke
Quoting Jakub Jelinek : On Sun, Mar 06, 2011 at 09:56:52AM +0100, Marc Glisse wrote: >uintmax_t is the largest of the standard unsigned C types, so it cannot be larger than unsigned long long. That's a gcc property then. The C99 standard only guarantees that uintmax_t is at least as large a

Re: __builtin_clzll and uintmax_t

2011-03-06 Thread Jakub Jelinek
On Sun, Mar 06, 2011 at 09:56:52AM +0100, Marc Glisse wrote: > >uintmax_t is the largest of the standard unsigned C types, so it cannot be > >larger than unsigned long long. > > That's a gcc property then. The C99 standard only guarantees that > uintmax_t is at least as large as unsigned long lon

Re: __builtin_clzll and uintmax_t

2011-03-06 Thread Marc Glisse
Coucou FX, On Sat, 5 Mar 2011, FX wrote: uintmax_t is the largest of the standard unsigned C types, so it cannot be larger than unsigned long long. That's a gcc property then. The C99 standard only guarantees that uintmax_t is at least as large as unsigned long long, but it is allowed to

Re: __builtin_clzll and uintmax_t

2011-03-05 Thread FX
Salut Marc ! > We have a variable of type uintmax_t and want to count the leading zeros. Can > we just call __builtin_clzll on it? Yes. > In particular, can uintmax_t be larger than unsigned long long in gcc? uintmax_t is the largest of the standard unsigned C types, so it cannot be larger th

__builtin_clzll and uintmax_t

2011-03-05 Thread Marc Glisse
Hello, the following question came up for a libstdc++ patch. We have a variable of type uintmax_t and want to count the leading zeros. Can we just call __builtin_clzll on it? In particular, can uintmax_t be larger than unsigned long long in gcc? Is __builtin_clzll available on all platforms?