uint_least32_t is in stdint.h not in inttypes.h

Hans Åberg haberg-1 at telia.com
Mon Nov 16 16:53:58 UTC 2020


> On 16 Nov 2020, at 10:53, Torbjörn Granlund <tg at gmplib.org> wrote:
> 
> Vincent Lefevre <vincent at vinc17.net> writes:
> 
>  So, including <inttypes.h> if present should be sufficient, and
>  this is what the above code does.
> 
>  That said, for C99 implementations, the #if tests would be useless,
>  so that the above code is also designed for non-C99 implementations,
>  which may have <inttypes.h> and <stdint.h> with a behavior different
>  from C99, i.e. <inttypes.h> will not necessarily include <stdint.h>
>  (but this also means that <stdint.h> will not necessarily have
>  uint_least32_t).
> 
> The mainline gmp repository and the next major GMP release (7.0) will
> require a C99 compiler.  I believe we have not fully determined which
> C++ standard we will require (or, Marc, did we come to a conclusion?).
> We will use C99 constructs and will gradually clean up code which
> handles older environments.

GCC has as default C++14, skipping over C++11 as the implementation was complicated, the latter which in turn first defined the corresponding headers.

https://en.cppreference.com/w/cpp/types/integer
https://en.cppreference.com/w/c/types/integer




More information about the gmp-bugs mailing list