Skip to content

Fix -Wchanges-meaning errors from newer GCC#1095

Open
MarijnS95 wants to merge 1 commit intollvm:mainfrom
Traverse-Research:fix-gcc15-wchanges-meaning
Open

Fix -Wchanges-meaning errors from newer GCC#1095
MarijnS95 wants to merge 1 commit intollvm:mainfrom
Traverse-Research:fix-gcc15-wchanges-meaning

Conversation

@MarijnS95
Copy link
Copy Markdown
Contributor

GCC 15 treats -Wchanges-meaning as an error, which fires when a struct member declaration shadows its own type name (e.g. Format Format; or std::unique_ptr<Fence> Fence;). CMake selects GCC as the default compiler on Linux when both GCC and Clang are installed, so the OffloadTest library fails to build on distros shipping GCC 15 (e.g. Arch Linux).

The shadowing was introduced by:

Rename the offending members to break the shadowing:

  • TextureCreateDesc::Format -> TextureCreateDesc::Fmt
  • InvocationState::Fence -> InvocationState::CompletionFence (all backends)

GCC 15 treats -Wchanges-meaning as an error, which fires when a
struct member declaration shadows its own type name (e.g.
`Format Format;` or `std::unique_ptr<Fence> Fence;`). CMake selects
GCC as the default compiler on Linux when both GCC and Clang are
installed, so the OffloadTest library fails to build on distros
shipping GCC 15 (e.g. Arch Linux).

The shadowing was introduced by:
- PR llvm#1020 (Introduce a new Texture type): `Format Format;` in
  TextureCreateDesc
- PR llvm#1007 (Implement an abstract Fence type): `unique_ptr<Fence> Fence;`
  in InvocationState (all backends)

Rename the offending members to break the shadowing:
- TextureCreateDesc::Format -> TextureCreateDesc::Fmt
- InvocationState::Fence -> InvocationState::CompletionFence (all backends)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants