This is an archive of the discontinued LLVM Phabricator instance.

Allow #pragma float_control(push|pop) within a language linkage specification
ClosedPublic

Authored by aaron.ballman on Jul 27 2021, 5:06 AM.

Details

Summary

Currently, we prohibit this pragma from appearing within a language linkage specification, but this is useful functionality that is supported by MSVC (which is where we inherited this feature from). This patch allows you to use the pragma within an extern "C" {} (etc) block.

Diff Detail

Event Timeline

aaron.ballman requested review of this revision.Jul 27 2021, 5:06 AM
aaron.ballman created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2021, 5:06 AM

Just one documentation change suggested.

Weird, phab didn't let me save the comment on the last one... done the right way this time :)

clang/docs/LanguageExtensions.rst
3549
erichkeane accepted this revision.Jul 27 2021, 6:01 AM

Doc change can be done as a part of the commit btw, otherwise this is fine to me.

This revision is now accepted and ready to land.Jul 27 2021, 6:01 AM
mibintc accepted this revision.Jul 27 2021, 7:24 AM

Thanks for fixing this Aaron, just curious was there a bug report?

mibintc added a subscriber: zahiraam.

Adding @zahiraam FYI

aaron.ballman closed this revision.Jul 28 2021, 4:39 AM
aaron.ballman marked an inline comment as done.

Thanks for fixing this Aaron, just curious was there a bug report?

There's no public bug to close from this, but it came as an internal (to Intel) report from a user.

Thank you for the reviews! I made the documentation change and pushed in b0ef3d8f666fa6008abb09340b73d9340d442569.