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

[Issue]: CXX_EXTENSIONS OFF set but GNU extensions are used #119

Open
LunNova opened this issue Jan 1, 2025 · 1 comment
Open

[Issue]: CXX_EXTENSIONS OFF set but GNU extensions are used #119

LunNova opened this issue Jan 1, 2025 · 1 comment

Comments

@LunNova
Copy link

LunNova commented Jan 1, 2025

The CXX_EXTENSIONS property is set to off in multiple CMake files in clr, but non-standard features are used so this property should be enabled.

Most compilers silently allow extensions unless -Wpedantic or specific warnings for extensions are enabled so there's no warning by default. Adding -Wpedantic or specific warnings like Wgnu-zero-variadic-macro-arguments to CXXFLAGS finds multiple places relying on extensions.

/build/source/rocclr/utils/debug.hpp:196:64: error: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Werror,-Wgnu-zero-variadic-macro-arguments]
  196 |           amd::log_printf(      hipMemcpyHtoA
level, __FILENAME__, __LINE__, format, ##__VA_ARGS__);                   \
      |                                                       
/build/source/rocclr/platform/memory.hpp:204:5: error: anonymous structs are a GNU extension [-Werror,-Wgnu-anonymous-struct]
  204 |     struct {
      |     ^
/build/source/rocclr/platform/memory.hpp:204:5: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types]
@ppanchad-amd
Copy link

Hi @LunNova. Internal ticket has been created to investigate your issue. 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

2 participants