This is an archive of the discontinued LLVM Phabricator instance.

[cfe] [Headers] Fix inttypes.h macros visibility in C++ with C99-compliant libc
Needs ReviewPublic

Authored by mgorny on Sep 26 2016, 8:54 AM.

Details

Reviewers
thakis
rsmith
Summary

Define __STDC_FORMAT_MACROS in order to enable all macros defined by inttypes.h in C++ mode, as was required by the C99 standard and was enforced by multiple old glibc versions. This extends the fix from r179419 that covered only macros defined by stdint.h but not those in inttypes.h.

Diff Detail

Event Timeline

mgorny updated this revision to Diff 72499.Sep 26 2016, 8:54 AM
mgorny retitled this revision from to [PATCH] [Headers] Fix inttypes.h macros visibility in C++ with C99-compliant libc.
mgorny updated this object.
mgorny added a reviewer: rsmith.
mgorny added a subscriber: cfe-commits.

By the way, if anyone happens to have a 'more final' copy of the standards handy, feel free to provide a more consistent footnote numbers ;-).

mgorny retitled this revision from [PATCH] [Headers] Fix inttypes.h macros visibility in C++ with C99-compliant libc to [cfe] [Headers] Fix inttypes.h macros visibility in C++ with C99-compliant libc.Sep 29 2016, 11:27 PM
ddunbar resigned from this revision.Jan 17 2017, 11:38 AM