This is an archive of the discontinued LLVM Phabricator instance.

Complete the list of single-underscore keywords for MSVC compat.
ClosedPublic

Authored by efriedma on Mar 10 2022, 1:57 PM.

Details

Summary

List derived from https://docs.microsoft.com/en-us/cpp/cpp/keywords-cpp . Not that this is something we really want to encourage, but some of these show up in practice, so I figured I should just complete the list.

Diff Detail

Event Timeline

efriedma created this revision.Mar 10 2022, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 1:57 PM
Herald added a subscriber: dexonsmith. · View Herald Transcript
efriedma requested review of this revision.Mar 10 2022, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 1:57 PM
efriedma updated this revision to Diff 414499.Mar 10 2022, 2:32 PM

Drop _except; __except is a contextual keyword.

rnk added a subscriber: rsmith.Mar 10 2022, 4:22 PM

@rsmith has previously advocated for a policy of only permitting conforming language extensions under fms-extensions. These single underscore names are not in the implementors namespace, so he has argued they should be under fms-compatibility. At least, that's what I vaguely recall, any mistakes in attribution are mine.

With that in mind, would you be OK moving the *new* names over to KEYMSCOMPAT instead?

That makes sense, sure. -fms-compatibility is on by default for clang-cl anyway.

efriedma updated this revision to Diff 415136.Mar 14 2022, 10:07 AM

Use KEYMSCOMPAT

rnk accepted this revision.Mar 14 2022, 10:33 AM

lgtm

This revision is now accepted and ready to land.Mar 14 2022, 10:33 AM