[PATCH] D49865: Inform the AST of #pragma FENV_ACCESS use
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 30 12:56:22 PDT 2018
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Parse/ParsePragma.cpp:619-623
+#if NOTYET // FIXME: Add this cli option when it makes sense.
+ case tok::OOS_DEFAULT:
+ FPC = getLangOpts().getDefaultFENVAccessMode();
+ break;
+#endif
----------------
rsmith wrote:
> You need to do *something* in this case. Currently, `FPC` is read uninitialized a few lines below when this happens. How about just treating this as the same as `OFF` for now, since that is our default.
Drop the `#if NOTYET` part; we don't like having checked-in but commented-out code. Just keep the FIXME comment.
================
Comment at: lib/Parse/ParsePragma.cpp:109
return;
- if (OOS == tok::OOS_ON)
+ if (OOS == tok::OOS_ON) {
PP.Diag(Tok, diag::warn_stdc_fenv_access_not_supported);
----------------
We also need to pass the pragma on to `Sema` when it's set to `OFF`.
https://reviews.llvm.org/D49865
More information about the cfe-commits
mailing list