From cec7c2b32ecfd38151822a6e01ec78afaf98bf9a Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 1 Sep 2021 04:48:50 -0700 Subject: Revert "[CLANG][PATCH][FPEnv] Add support for option -ffp-eval-method and extend #pragma float_control similarly" The intent of this patch is to add support of -fp-model=[source|double|extended] to allow the compiler to use a wider type for intermediate floating point calculations. As a side effect to that, the value of FLT_EVAL_METHOD is changed according to the pragma float_control. Unfortunately some issue was uncovered with this change in preprocessing. See details in https://reviews.llvm.org/D93769 . We are therefore reverting this patch until we find a way to reconcile the value of FLT_EVAL_METHOD, the pragma and the -E flow. This reverts commit 66ddac22e2a7f268e91c26d694112970dfa607ae. --- clang/lib/Frontend/CompilerInvocation.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 9f891f2..64800b1 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4245,13 +4245,8 @@ static bool ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, // Always avoid lexing editor placeholders when we're just running the // preprocessor as we never want to emit the // "editor placeholder in source file" error in PP only mode. - // Certain predefined macros which depend upon semantic processing, - // for example __FLT_EVAL_METHOD__, are not expanded in PP mode, they - // appear in the preprocessed output as an unexpanded macro name. - if (isStrictlyPreprocessorAction(Action)) { + if (isStrictlyPreprocessorAction(Action)) Opts.LexEditorPlaceholders = false; - Opts.LexExpandSpecialBuiltins = false; - } return Diags.getNumErrors() == NumErrorsBefore; } -- cgit v1.1