uint_least32_t is in stdint.h not in inttypes.h

Felix von Leitner felix-gmplib at fefe.de
Sun Nov 15 21:21:18 UTC 2020

Dear gmp team,

I was trying to compile gmp with my libc, dietlibc, and got an error
that uint_least32_t is not defined.

Well, it is defined, and as far as I can tell in the right header file,
too: stdint.h.

However, gmp-impl.h reads as follows:

 155 #if HAVE_INTTYPES_H      /* for uint_least32_t */
 156 # include <inttypes.h>
 157 #else
 158 # if HAVE_STDINT_H
 159 #  include <stdint.h>
 160 # endif
 161 #endif

Note that stdint.h is in the else clause. dietlibc has both inttypes.h and stdint.h.

For reference, please see:



Proposed fix: Move the #if HAVE_STDINT_H outside the previous #if.



More information about the gmp-bugs mailing list