This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1724 - lots of warnings with MinGW-w64 7.3
Summary: lots of warnings with MinGW-w64 7.3
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.3 (current stable)
Hardware: x86 - 64-bit Windows
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-14 11:53 UTC by Julian Hapke
Modified: 2019-12-04 18:41 UTC (History)
4 users (show)



Attachments
test scenario (20.80 KB, application/x-7z-compressed)
2019-06-14 11:53 UTC, Julian Hapke
no flags Details

Description Julian Hapke 2019-06-14 11:53:41 UTC
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
Comment 1 Christoph Hertzberg 2019-06-14 12:29:58 UTC
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
Comment 2 Julian Hapke 2019-06-14 12:36:31 UTC
seems to be a gcc issue:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
Comment 3 Julian Hapke 2019-06-14 12:41:42 UTC
(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!
Comment 5 Nobody 2019-12-04 18:41:13 UTC
-- 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.

Note You need to log in before you can comment on or make changes to this bug.