This is an archive of the discontinued LLVM Phabricator instance.

Add an inttypes.h wrapper that fixes up some macros in Microsoft mode
ClosedPublic

Authored by thakis on Jun 25 2015, 5:04 PM.

Details

Reviewers
hans
Summary

Before MSVS2015, MSVS's headers disagree about int32_t and PRIx32 and so on. Provide a wrapper header to fix this, so that -Wformat can still be used. Fixes PR23412.

Diff Detail

Event Timeline

thakis updated this revision to Diff 28517.Jun 25 2015, 5:04 PM
thakis retitled this revision from to Add an inttypes.h wrapper that fixes up some macros in Microsoft mode.
thakis updated this object.
thakis edited the test plan for this revision. (Show Details)
thakis added a reviewer: hans.
thakis added a subscriber: Unknown Object (MLST).
hans accepted this revision.Jun 25 2015, 5:10 PM
hans edited edge metadata.

Nice! Thanks for fixing.

I think lib/Headers/CMakeLists.txt needs to be updated too.

lib/Headers/inttypes.h
3

It seems this line is mostly present in the older headers (with years like 2008 and 2009 on them). I looked at cpuid.h and immintrin.h, and they don't have it. IANAL etc., but I would go for the shorter version.

This revision is now accepted and ready to land.Jun 25 2015, 5:10 PM
thakis added inline comments.Jun 25 2015, 5:12 PM
lib/Headers/inttypes.h
3

Ok. Should we remove it from the files that have it too?

thakis closed this revision.Jun 25 2015, 5:13 PM

r240741

hans added inline comments.Jun 25 2015, 5:19 PM
lib/Headers/inttypes.h
3

I guess consistency would be nice, but this also doesn't seem very important.