Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with gcc5.3.0 due to isnan() ambiguity #1112

Closed
TobiKattmann opened this issue Nov 20, 2020 · 2 comments
Closed

Compilation fails with gcc5.3.0 due to isnan() ambiguity #1112

TobiKattmann opened this issue Nov 20, 2020 · 2 comments
Labels

Comments

@TobiKattmann
Copy link
Contributor

Describe the bug
In PR #1105 an isnan(SU2_TYPE::GetValue(monitor)) check was introduced. I get a compiler error (serial build, no AD DD involved) call of overload isnan(souble&) is ambiguos so the complier is probably confused about the return type of SU2_TYPE::GetValue(monitor) which is passivedouble which itself is hardcoded to be double in datatype_structure.hpp. Or sth else is happening idk

image

I only have the problem with gcc5.3.0. On the same system I have an unsupported gcc7.4.0 that works. My private machine with gcc10.2.0 works fine as well. So I guess it is a specific compiler problem.

In my I hit the ⌨️ a few times without actually knowing what I am doing:

  • use isnan(monitor) ... same error
  • use isnan(static_cast<double>(monitor)) ... same error
  • use isnan(static_cast<double>(SU2_TYPE::GetValue(monitor))) ... same error
  • changed the return type of GetValue to double ...same error

I guess this problem is really specific to my setup. gcc5.3.0 is old but not grandpa kinda old with the release dec 2015 ... well ok maybe it is 👴
I would be happy with some suggestions what to try out maybe, also if I misinterpret the error a pointer in the right direction would help. If @pcarruscag could have a quick look that would be great.

Thanks and warm regards, Tobi

To Reproduce
You probably cant without an old enough compiler

Desktop (please complete the following information):

  • OS: RHES 7.6
  • C++ compiler and version: g++ (GCC) 5.3.0
  • SU2 Version: latest develop
@pcarruscag
Copy link
Member

Can you try sticking the good old std:: behind isnan
(I don't have 5.3.0 and 5.4.0 does not complain).

@TobiKattmann
Copy link
Contributor Author

Dang... that fixes it 🐙 . I close issue then as you already resolve this in PR #1107
Thanks pedro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants