File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1010
1111// Throw warning when including sycl.hpp without using -fsycl flag.
1212// Warning can be disabled by defining SYCL_DISABLE_FSYCL_SYCLHPP_WARNING macro.
13- #define STRINGIFY (x ) #x
14- #define TOSTRING (x ) STRINGIFY (x)
13+ #define __SYCL_STRINGIFY (x ) #x
14+ #define __SYCL_TOSTRING (x ) __SYCL_STRINGIFY (x)
1515
1616#ifdef _MSC_VER
17- #define WARNING (msg ) \
18- __pragma (message(__FILE__ " (" TOSTRING (__LINE__) "): warning: " msg))
17+ #define __SYCL_WARNING (msg ) \
18+ __pragma (message(__FILE__ " (" __SYCL_TOSTRING (__LINE__) "): warning: " msg))
1919#elif defined(__GNUC__) || defined(__clang__)
20- #define WARNING (msg ) _Pragma (TOSTRING (GCC warning msg))
20+ #define __SYCL_WARNING (msg ) _Pragma (__SYCL_TOSTRING (GCC warning msg))
2121#else
22- #define WARNING (msg ) // Unsupported compiler
22+ #define __SYCL_WARNING (msg ) // Unsupported compiler
2323#endif
2424
2525#if !defined(SYCL_LANGUAGE_VERSION) && \
2626 !defined (SYCL_DISABLE_FSYCL_SYCLHPP_WARNING)
27- WARNING (" You are including <sycl/sycl.hpp> without -fsycl flag, \
27+ __SYCL_WARNING (" You are including <sycl/sycl.hpp> without -fsycl flag, \
2828which is errorenous for device code compilation. This warning \
2929can be disabled by setting SYCL_DISABLE_FSYCL_SYCLHPP_WARNING macro." )
3030#endif
31- #undef WARNING
32- #undef TOSTRING
33- #undef STRINGIFY
31+ #undef __SYCL_WARNING
32+ #undef __SYCL_TOSTRING
33+ #undef __SYCL_STRINGIFY
3434
3535#include < sycl/detail/core.hpp>
3636
You can’t perform that action at this time.
0 commit comments