This is an archive of the discontinued LLVM Phabricator instance.

[libc++][AIX] Correct the definition of __regex_word for AIX
ClosedPublic

Authored by xingxue on Jul 15 2022, 8:23 AM.

Details

Summary

The patch changes the definition of __regex_word to 0x8000 for AIX because the current definition 0x80 clashes with ctype_base::print (_ISPRINT is defined as 0x80 in AIX ctype.h).

Diff Detail

Event Timeline

xingxue created this revision.Jul 15 2022, 8:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 8:23 AM
xingxue requested review of this revision.Jul 15 2022, 8:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 8:23 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.Jul 15 2022, 9:19 AM

Thanks for the fixes! LGTM for libc++, please wait for approval of one of the AIX maintainers.

This revision is now accepted and ready to land.Jul 15 2022, 9:19 AM

LGTM; thanks! Can we have a test with a static_assert that checks the bits are disjoint (check union of all flags has the right number of 1s)?

xingxue updated this revision to Diff 445223.Jul 16 2022, 4:03 AM

Can we have a test with a static_assert that checks the bits are disjoint (check union of all flags has the right number of 1s)?

Thanks for catching this, @hubert.reinterpretcast! There is actually an static_assert that checks if regex_word overlaps other bits but it is disabled for AIX. This update enables it.

Can we have a test with a static_assert that checks the bits are disjoint (check union of all flags has the right number of 1s)?

Thanks for catching this, @hubert.reinterpretcast! There is actually an static_assert that checks if regex_word overlaps other bits but it is disabled for AIX. This update enables it.

Thank you, Xing, for the update! Confirming LGTM.