diff options
author | Eric Fiselier <eric@efcs.ca> | 2019-02-11 23:47:19 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2019-02-11 23:47:19 +0000 |
commit | cf39dd44b8d03fec211dcc3d28e61f4ed6dc47f2 (patch) | |
tree | de7a9e0a40544a87242359fd1589949197b4ea19 /libcxx/test/std/depr | |
parent | 5906a6591cdc3aefe6c9cd67831724cae7978471 (diff) | |
download | bcm5719-llvm-cf39dd44b8d03fec211dcc3d28e61f4ed6dc47f2.tar.gz bcm5719-llvm-cf39dd44b8d03fec211dcc3d28e61f4ed6dc47f2.zip |
Add fenv.h header
Summary:
Some implementations of fenv.h use macros to define the functions they provide. This can cause problems when `std::fegetround()` is spelled in source.
This patch adds a `fenv.h` header to libc++ for the sole purpose of turning those macros into real functions.
Reviewers: rsmith, mclow.lists, ldionne
Reviewed By: rsmith
Subscribers: mgorny, christof, libcxx-commits
Differential Revision: https://reviews.llvm.org/D57729
llvm-svn: 353767
Diffstat (limited to 'libcxx/test/std/depr')
-rw-r--r-- | libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp index 3a6f63c3fc3..6b38f4e6c5d 100644 --- a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp @@ -61,17 +61,17 @@ int main(int, char**) { fenv_t fenv = {}; fexcept_t fex = 0; - static_assert((std::is_same<decltype(feclearexcept(0)), int>::value), ""); - static_assert((std::is_same<decltype(fegetexceptflag(&fex, 0)), int>::value), ""); - static_assert((std::is_same<decltype(feraiseexcept(0)), int>::value), ""); - static_assert((std::is_same<decltype(fesetexceptflag(&fex, 0)), int>::value), ""); - static_assert((std::is_same<decltype(fetestexcept(0)), int>::value), ""); - static_assert((std::is_same<decltype(fegetround()), int>::value), ""); - static_assert((std::is_same<decltype(fesetround(0)), int>::value), ""); - static_assert((std::is_same<decltype(fegetenv(&fenv)), int>::value), ""); - static_assert((std::is_same<decltype(feholdexcept(&fenv)), int>::value), ""); - static_assert((std::is_same<decltype(fesetenv(&fenv)), int>::value), ""); - static_assert((std::is_same<decltype(feupdateenv(&fenv)), int>::value), ""); + static_assert((std::is_same<decltype(::feclearexcept(0)), int>::value), ""); + static_assert((std::is_same<decltype(::fegetexceptflag(&fex, 0)), int>::value), ""); + static_assert((std::is_same<decltype(::feraiseexcept(0)), int>::value), ""); + static_assert((std::is_same<decltype(::fesetexceptflag(&fex, 0)), int>::value), ""); + static_assert((std::is_same<decltype(::fetestexcept(0)), int>::value), ""); + static_assert((std::is_same<decltype(::fegetround()), int>::value), ""); + static_assert((std::is_same<decltype(::fesetround(0)), int>::value), ""); + static_assert((std::is_same<decltype(::fegetenv(&fenv)), int>::value), ""); + static_assert((std::is_same<decltype(::feholdexcept(&fenv)), int>::value), ""); + static_assert((std::is_same<decltype(::fesetenv(&fenv)), int>::value), ""); + static_assert((std::is_same<decltype(::feupdateenv(&fenv)), int>::value), ""); return 0; } |