[PATCH] D64388: Explicitly define __STDC_FORMAT_MACROS for PRIu64
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 11:29:29 PDT 2019
hctim added inline comments.
================
Comment at: compiler-rt/trunk/lib/gwp_asan/guarded_pool_allocator.cpp:14
+// RHEL creates the PRIu64 format macro (for printing uint64_t's) only when this
+// macro is defined before including <inttypes.h>.
+#ifndef __STDC_FORMAT_MACROS
----------------
lebedev.ri wrote:
> How do you know it wasn't included before somewhere, by some previous header?
> This i think normally should be solved by adding `-D__STDC_FORMAT_MACROS` to compile command.
So it looks like LLVM handles this through `add_definitions( -D__STDC_FORMAT_MACROS )`, but subprojects (openmp) does this in the same way as this patch (`openmp/runtime/test/ompt/callback.h:6`).
I personally like the former, so I'll follow up with a revert + fix later today.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64388/new/
https://reviews.llvm.org/D64388
More information about the llvm-commits
mailing list