[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 3 10:44:28 PST 2022


aaron.ballman added reviewers: rsmith, joerg, rjmccall, andrew.w.kaylor, aaron.ballman.
aaron.ballman added a comment.

Thanks for this! I'm adding some more reviewers to the list to help get this reviewed.

The patch doesn't seem to apply cleanly, so precommit CI isn't running on it. Can you rectify that? Also, the change needs test coverage of some kind.



================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp    :1022
+    Builder.defineMacro("__NO_MATH_ERRNO__");
+
   if (LangOpts.FastMath || LangOpts.FiniteMathOnly)
----------------
Does GCC gate on `-ffast-math`? My testing suggests that `-fno-math-errno` alone is what sets this macro in GCC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116337/new/

https://reviews.llvm.org/D116337



More information about the cfe-commits mailing list