Skip to content
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

Compiler warnings for g++13.1 #3296

Open
torrance opened this issue Aug 3, 2023 · 6 comments
Open

Compiler warnings for g++13.1 #3296

torrance opened this issue Aug 3, 2023 · 6 comments

Comments

@torrance
Copy link

torrance commented Aug 3, 2023

When compiling with -Wpendantic, g++ 13.1 emits the following warnings when simply including hip/hip_runtime.h:

g++ --std=c++17 playground.cpp -Wall -Wextra -Wpedantic -o playground -I/opt/rocm/include --D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=
In file included from /opt/rocm/include/hip/amd_detail/amd_channel_descriptor.h:28,
                 from /opt/rocm/include/hip/channel_descriptor.h:32,
                 from /opt/rocm/include/hip/texture_types.h:38,
                 from /opt/rocm/include/hip/hip_runtime_api.h:489,
                 from /opt/rocm/include/hip/hip_runtime.h:113,
                 from playground.cpp:3:
/opt/rocm/include/hip/amd_detail/amd_hip_vector_types.h:152:20: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  152 |             struct {
      |                    ^
/opt/rocm/include/hip/amd_detail/amd_hip_vector_types.h:187:20: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  187 |             struct {
      |                    ^
/opt/rocm/include/hip/amd_detail/amd_hip_vector_types.h:368:20: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  368 |             struct {
      |                    ^
/opt/rocm/include/hip/amd_detail/amd_hip_vector_types.h:411:20: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  411 |             struct {
@cjatin
Copy link
Contributor

cjatin commented Aug 3, 2023

We want to fix it but it might require a some work and restructuring of code inorder to preserve API/ABI compatibility.

For now can you use something like:

#pragma GCC diagnostic ignored "-Wpedantic"
#include <hip/hip_runtime.h>
#pragma GCC diagnostic pop

@ppanchad-amd
Copy link

@torrance Can you please test with latest ROCm 6.1.0 (HIP 6.1)? If resolved, please close ticket. Thanks!

@ppanchad-amd
Copy link

@torrance Closing ticket for now. Please feel free to re-open ticket if you still see the issue with the latest ROCm. Thanks!

@ppanchad-amd ppanchad-amd closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@IMbackK
Copy link

IMbackK commented Dec 9, 2024

this is still a problem as can easly be seen by looking at the header in question. Even in rocm 6.3 this problem still exits:
https://github.com/ROCm/clr/blob/0d4823ff880947ec3f5818101e0e32b5889de175/hipamd/include/hip/amd_detail/amd_hip_vector_types.h#L153

@IMbackK
Copy link

IMbackK commented Dec 9, 2024

@ppanchad-amd please reopen this issue

@ppanchad-amd
Copy link

Hi @IMbackK. Re-opened ticket and assigned for investigation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants