[libc-commits] [PATCH] D115828: [libc] Implement correctly rounded log2f based on RLIBM library.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Dec 15 23:54:54 PST 2021


sivachandra added inline comments.


================
Comment at: libc/src/math/generic/common_constants.h:15
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc++17-extensions"
+
----------------
lntue wrote:
> sivachandra wrote:
> > lntue wrote:
> > > michaelrj wrote:
> > > > is this intended to be a long term solution? It feels like there should be an easier way to handle using hexadecimal float constants.
> > > I think the long term solution is to build libc with C++17 standard and get rid of these.
> > Can you check if adding `-std=c++17` to COMPILE_OPTIONS fixes the warning problem for you?
> I tried to add `-std=c++17` to the `CMakeList.txt` files in `src/math`, `src/math/generic`, and `test/src/math` but the warnings still show up when the pragmas are removed.
I think we pass -std=c++14 explicitly also and that confuses the compiler. You should be able to add `-Wno-c++17-extensions` to `COMPILE_OPTIONS`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115828



More information about the libc-commits mailing list