Advertisement
fsb4000

for nvidia bug report

Jul 16th, 2021
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. While implementing https://github.com/microsoft/STL/pull/2061 I found a nvcc bug.
  2. It can't parse macro.
  3.  
  4. #define _WARNING_MESSAGE(NUMBER, MESSAGE) __FILE__ "(" _CRT_STRINGIZE(__LINE__) "): warning " NUMBER ": " MESSAGE
  5. #pragma message(_WARNING_MESSAGE( \
  6. "STL4033", "The contents of <coroutine> are available only with C++20 or later or /await:strict."))
  7. #include <vector>
  8.  
  9.  
  10. nvcc -c --x cu -allow-unsupported-compiler test.cpp
  11.  
  12.  
  13. See screnshots: https://imgur.com/a/wnwRsBj
  14.  
  15. But if I reformat #pragma message on one line then it works.
  16.  
  17. #define _WARNING_MESSAGE(NUMBER, MESSAGE) __FILE__ "(" _CRT_STRINGIZE(__LINE__) "): warning " NUMBER ": " MESSAGE
  18. #pragma message(_WARNING_MESSAGE( "STL4033", "The contents of <coroutine> are available only with C++20 or later or /await:strict."))
  19. #include <vector>
  20.  
  21. nvcc --version
  22. nvcc: NVIDIA (R) Cuda compiler driver
  23. Copyright (c) 2005-2021 NVIDIA Corporation
  24. Built on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021
  25. Cuda compilation tools, release 11.3, V11.3.109
  26. Build cuda_11.3.r11.3/compiler.29920130_0
  27.  
  28. I hope it helps...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement