Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compiler warnings when building with GCC

Open
#342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
compilers

Research direction

Reproduce the warnings with GCC 16 on Linux or mingw-w64 using -Wall -Wextra -Wpedantic. Inspect the reported anonymous structs in DirectXMath/Inc/DirectXMath.h and the unused variables in DirectXMath/Inc/DirectXMathMatrix.inl around line 1165. Done means the reported warnings are addressed while the library still builds successfully.

Written by the indexing model from the issue text.

Description

Building with GCC 16 on Linux or mingw-w64 using -Wall -Wextra -Wpedantic flags generates the following compiler warnings:

In file included from main.cpp:3:
DirectXMath/Inc/DirectXMath.h:845:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  845 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:903:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  903 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:975:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  975 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:1043:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
 1043 |             {
      |             ^
In file included from DirectXMath/Inc/DirectXMath.h:2372:
DirectXMath/Inc/DirectXMathMatrix.inl: In function ‘bool DirectX::XMMatrixDecompose(XMVECTOR*, XMVECTOR*, XMVECTOR*, FXMMATRIX)’:
DirectXMath/Inc/DirectXMathMatrix.inl:1165:16: warning: variable ‘aa’ set but not used [-Wunused-but-set-variable=]
 1165 |         size_t aa, bb, cc;
      |                ^~
DirectXMath/Inc/DirectXMathMatrix.inl:1165:20: warning: variable ‘bb’ set but not used [-Wunused-but-set-variable=]
 1165 |         size_t aa, bb, cc;
      |                    ^~

Clang doesn't seem to report any of these.

Dominant language
C++
Stars
1.8k
Forks
262
Avg merge
3d 12h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DirectXMath

All issues in microsoft/DirectXMath

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.