Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- While implementing https://github.com/microsoft/STL/pull/2061 I found a nvcc bug.
- It can't parse macro.
- #define _WARNING_MESSAGE(NUMBER, MESSAGE) __FILE__ "(" _CRT_STRINGIZE(__LINE__) "): warning " NUMBER ": " MESSAGE
- #pragma message(_WARNING_MESSAGE( \
- "STL4033", "The contents of <coroutine> are available only with C++20 or later or /await:strict."))
- #include <vector>
- nvcc -c --x cu -allow-unsupported-compiler test.cpp
- See screnshots: https://imgur.com/a/wnwRsBj
- But if I reformat #pragma message on one line then it works.
- #define _WARNING_MESSAGE(NUMBER, MESSAGE) __FILE__ "(" _CRT_STRINGIZE(__LINE__) "): warning " NUMBER ": " MESSAGE
- #pragma message(_WARNING_MESSAGE( "STL4033", "The contents of <coroutine> are available only with C++20 or later or /await:strict."))
- #include <vector>
- nvcc --version
- nvcc: NVIDIA (R) Cuda compiler driver
- Copyright (c) 2005-2021 NVIDIA Corporation
- Built on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021
- Cuda compilation tools, release 11.3, V11.3.109
- Build cuda_11.3.r11.3/compiler.29920130_0
- I hope it helps...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement