[PATCH] D98895: [X86][clang] Disable long double type for -mno-x87 option

Andrew Savonichev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 4 12:18:49 PDT 2021


asavonic added a comment.

@nickdesaulniers, thanks a lot for reporting this!
Unfortunately it is not easy to keep compatibility with GCC in this case. GCC has this diagnostic very late in the pipeline, and trivial uses of `long double` type (e.g. unused variables, constant expressions) can be optimized away before that. We cannot do the same with LLVM, because there is no way to emit a nice source-level diagnostic from the codegen.
I suggest to fix the kernel, because it looks like the `long double` literal is not intentional and can be replaced with just `double`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98895



More information about the cfe-commits mailing list