[flang-commits] [flang] [flang] Use std::uintptr_t instead of unsigned long for better cross-platform stability (PR #183913)

via flang-commits flang-commits at lists.llvm.org
Mon Mar 2 08:56:25 PST 2026


================
@@ -253,31 +253,17 @@ constexpr TypeBuilderFunc getModel<void (*)(int)>() {
 }
 template <>
 constexpr TypeBuilderFunc
-getModel<void *(*)(void *, const void *, unsigned long)>() {
+getModel<void *(*)(void *, const void *, std::uintptr_t)>() {
----------------
dragon-archer wrote:

Well, that may be true, but even on this platforms, as long as `memcpy` still use `size_t` (which is enforced by C standard and also assumed to be true by other parts of code in the blame), then we should use `size_t` as well.

https://github.com/llvm/llvm-project/pull/183913


More information about the flang-commits mailing list