diff --git a/clang/lib/Frontend/InitPreprocessor.cpp.orig b/clang/lib/Frontend/InitPreprocessor.cpp --- a/clang/lib/Frontend/InitPreprocessor.cpp.orig +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1019,6 +1019,9 @@ Builder.defineMacro("__USER_LABEL_PREFIX__", TI.getUserLabelPrefix()); + if (LangOpts.FastMath || !LangOpts.MathErrno) + Builder.defineMacro("__NO_MATH_ERRNO__"); + if (LangOpts.FastMath || LangOpts.FiniteMathOnly) Builder.defineMacro("__FINITE_MATH_ONLY__", "1"); else