[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 14 16:09:55 PDT 2020
rjmccall added a subscriber: scanon.
rjmccall added a comment.
That's a really useful concept, and given that it exists, I agree that we shouldn't invent something else. The fact that it covers local variables with constant initializers that happen to be `const` seems really unfortunate, though. @scanon, any opinions here about how important it is to give consistent semantics to a floating-point expression in a static local initializer in C and C++ under `#pragma STDC FENV_ACCESS`?
Note that we'll need to implement the C semantics in any case, which I'm pretty sure means we need to track whether an expression is in a constant initializer or not — we need to constant-evaluate `1.0 / 3.0` as the initializer of a static local but refuse to do so as the initializer of an auto local — so I'm not sure the implementation gets all that much simpler based on our decision for C++.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87528/new/
https://reviews.llvm.org/D87528
More information about the cfe-commits
mailing list