[PATCH] D31856: Headers: Make the type of SIZE_MAX the same as size_t

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 14:46:02 PDT 2017


rsmith added a comment.

In https://reviews.llvm.org/D31856#733845, @efriedma wrote:

> We normally use stdint.h from the host C library, rather than our own version; this file is only relevant in -ffreestanding mode.  So it should be safe to change.


Agreed; r89237 (and nearby changes: r89221, r89224, r89226) are simply wrong. We cannot determine the correct types from the bitwidth alone; there may be multiple types with the relevant width and we must pick the right one. If we back out all of those changes and instead use the correct types as provided by `__*_TYPE__`, we should be able to remove the `__*_WIDTH__` macros too.


https://reviews.llvm.org/D31856





More information about the cfe-commits mailing list