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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to