Skip to content

Commit 470aec7

Browse files
AlexeySachkovbader
authored andcommitted
[SYCL] Silence warning about unsupported pragma
From https://en.cppreference.com/w/cpp/numeric/fenv: > The floating-point environment access and modification is only meaningful when #pragma STDC FENV_ACCESS is supported and is set to ON. Otherwise the implementation is free to assume that floating-point control modes are always the default ones and that floating-point status flags are never tested or modified. In practice, few current compilers, such as HP aCC, Oracle Studio, or IBM XL, support the #pragma explicitly, but most compilers allow meaningful access to the floating-point environment anyway. Since this pragma is not supported by clang and gcc and we don't have a way to check if it is supported, removing this pragma shouldn't affect functionality at all (at least if clang and gcc are used as host compilers) Signed-off-by: Alexey Sachkov <[email protected]>
1 parent b1b8608 commit 470aec7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

sycl/include/CL/sycl/types.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#include <cmath>
5555
#ifndef __SYCL_DEVICE_ONLY__
5656
#include <cfenv>
57-
#pragma STDC FENV_ACCESS ON
5857
#endif
5958

6059
// 4.10.1: Scalar data types

0 commit comments

Comments
 (0)