clang -Wused-but-marked-unused warnings in a few places
Summary
clang -Wused-but-marked-unused warnings in a few places
Environment
macOS Intel & clang
Warning Messages
Eigen/src/Core/arch/SSE/Complex.h:336:10: warning: 'psqrt_complex<Eigen::internal::Packet1cd>' was marked unused but was used [-Wused-but-marked-unused]
return psqrt_complex<Packet1cd>(a);
^
Eigen/src/Core/arch/SSE/Complex.h:340:10: warning: 'psqrt_complex<Eigen::internal::Packet2cf>' was marked unused but was used [-Wused-but-marked-unused]
return psqrt_complex<Packet2cf>(a);
^
Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h:398:17: warning: 'plog<__attribute__((__vector_size__(4 * sizeof(float)))) float>' was marked unused but was used [-Wused-but-marked-unused]
Packet log1 = plog(xp1);
^
Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h:413:14: warning: 'pexp<__attribute__((__vector_size__(4 * sizeof(float)))) float>' was marked unused but was used [-Wused-but-marked-unused]
Packet u = pexp(x);
^
Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h:417:17: warning: 'plog<__attribute__((__vector_size__(4 * sizeof(float)))) float>' was marked unused but was used [-Wused-but-marked-unused]
Packet logu = plog(u);
^
These are all true positives as best as I can tell.
These functions are clearly used, yet are decorated with EIGEN_UNUSED. Perhaps they are unused on different platforms though.
Perhaps the "maybe unused" attribute would be useful here?
https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused