[libcxx-commits] [libcxx] [libc++] Protect the libc++ implementation from CUDA SDK's `__noinline__` macro (PR #73838)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 29 10:38:23 PST 2023
https://github.com/ldionne commented:
On the one hand, working around this appears to be fairly simple and we have precedent for this for other macros. On the other hand, NVIDIA apparently acknowledges the risk for conflicts when they define this macro according to the SO answer:
```
/* gcc allows users to define attributes with underscores,
e.g., __attribute__((__noinline__)).
Consider a non-CUDA source file (e.g. .cpp) that has the
above attribute specification, and includes this header file. In that case,
defining __noinline__ as below would cause a gcc compilation error.
Hence, only define __noinline__ when the code is being processed
by a CUDA compiler component.
*/
```
Fixing this here doesn't provide much of an incentive for them to fix their SDK, but being incompatible with a major C++ standard library implementation would. Do we have anyone from Nvidia around here who could enlighten us on the status of that bug report?
https://github.com/llvm/llvm-project/pull/73838
More information about the libcxx-commits
mailing list