Created attachment 945 [details] test scenario Compiler MinGW-w64 7.3 (provided by Qt) puts out lots of warning when Eigen is included. Does not occur with MinGW-w64 8.3 from MSYS2. C:\TEMP\gcc_eigen_test>g++ --version g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. vwuwt50@XXXXXXXXXXXXXX MINGW64 /c/TEMP/gcc_eigen_test $ g++ --version g++.exe (Rev2, Built by MSYS2 project) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Test is compiled with: g++ -I. -o main.o main.cpp > warnings.txt 2>&1
I can't reproduce with g++-7.4 on ubuntu 16.04 using your example, but I get similar warnings with the test-case mentioned here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325#c5 Perhaps MinGW has a different implementation of "cmath"/"math.h". Can you try adding this to your "Eigen/src/Core/util/DisableStupidWarnings.h": #if __GNUC__==7 // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325 #pragma GCC diagnostic ignored "-Wattributes" #endif
seems to be a gcc issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
(In reply to Christoph Hertzberg from comment #1) > I can't reproduce with g++-7.4 on ubuntu 16.04 using your example, but I get > similar warnings with the test-case mentioned here: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325#c5 > > Perhaps MinGW has a different implementation of "cmath"/"math.h". > > Can you try adding this to your > "Eigen/src/Core/util/DisableStupidWarnings.h": > > #if __GNUC__==7 > // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325 > #pragma GCC diagnostic ignored "-Wattributes" > #endif oh sorry, did not see your comment before posting mine. I added the pragma and the warnings are gone, thanks!
Pushed to 3.3 and default: https://bitbucket.org/eigen/eigen/commits/61bfd661b96fb https://bitbucket.org/eigen/eigen/commits/bc7e634886a41
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1724.