[flang-commits] [flang] [flang][runtime] zero size allocation in source allocation (PR #66124)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Tue Sep 12 11:50:43 PDT 2023


klausler wrote:

Be advised, the C/C++ standards leave the behavior of `malloc` implementation-defined in the case of a zero-sized allocation, and they are allowed to return a null pointer or to return a non-null pointer that is not distinct from other zero-sized allocations.  Consider allocating at least a single byte.

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


More information about the flang-commits mailing list