-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: To avoid GCC to fail in preprocessing the __concept header files using "-C" option #1927
Comments
Thank you for reporting this! I assume @miscco added the comments for guiding clang-format into a more pleasant formatting. |
Replacing |
…within macros. Those comments were ment to force clang-format into doing not so bad things with the concept emulation. However, with the recent versions of clang-format this is not necessary anymore Fixes NVIDIA#1927
Those comments were used to force clang-format into submission as it completely mangled these pieces of code. With our current version this does not happen anymore, so we can drop them alltogether |
…within macros. Those comments were ment to force clang-format into doing not so bad things with the concept emulation. However, with the recent versions of clang-format this is not necessary anymore Fixes NVIDIA#1927
…within macros. Those comments were ment to force clang-format into doing not so bad things with the concept emulation. However, with the recent versions of clang-format this is not necessary anymore Fixes NVIDIA#1927
…within macros. Those comments were ment to force clang-format into doing not so bad things with the concept emulation. However, with the recent versions of clang-format this is not necessary anymore Fixes NVIDIA#1927
* It seems that the gcc proprocessor at times has issues with comments within macros. Those comments were ment to force clang-format into doing not so bad things with the concept emulation. However, with the recent versions of clang-format this is not necessary anymore Fixes #1927
Is this a duplicate?
Type of Bug
Compile-time Error
Component
libcu++
Describe the bug
For this test:
GCC started failing during preprocessing with the "-C" option after this commit:
https://github.com/NVIDIA/cccl/commit/680c01207c8611c011ba6eed4ba30cb0c8ab2d20#diff-97033c0ba44556602cf7d7eeda4fa26ead8d8ba9ee63b55be99ae263194e124a
This bug in GCC is triggered by the new changes in the __concept header files when using the "-C" option.
For example, for this definition of the Movable in cuda12.3 we have:
, while with cuda12.4, we have:
Having the comment "//" within the code causes GCC to fail in the preprocessing phase when using "-C" option:
Here is the smaller reproducer that confirms this bug in GCC preprocessing when using "-C" option:
In the commit that CCCL has made, there is no explanation why the comment was added to those __concept header files. If the comment gets eliminated, then GCC would compile this test fine.
How to Reproduce
g++ -E -C ec.cpp
Expected behavior
To not failing in the preprocessing phase.
Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
The text was updated successfully, but these errors were encountered: