Remove trailing semicolon from EIGEN_UNUSED_VARIABLE macro
Summary
The EIGEN_UNUSED_VARIABLE() macro included a trailing semicolon in its expansion, causing double-semicolons (;;) at the ~360 call sites that also had a semicolon. This triggers -Wextra-semi-stmt warnings (Clang) and -Wextra-semi (GCC).
Fix
Remove the semicolon from the macro definition (standard C/C++ macro convention: callers provide the semicolon) and add missing semicolons to the ~100 call sites that relied on the macro providing one.
Changed files
-
Eigen/src/Core/util/Macros.h— macro definition (1 char removed) - 20 other files — added missing semicolons at call sites
Testing
-
basicstuff,sparse_basic,cxx11_tensor_scan— all pass (GCC 15.2.0, C++20)
Closes #3007 (closed)