Bug ID | 1056783 |
---|---|
Summary | GCC 6 C++: std::isnan fails to compile with cmath |
Classification | openSUSE |
Product | openSUSE Tumbleweed |
Version | Current |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Development |
Assignee | bnc-team-screening@forge.provo.novell.com |
Reporter | qantas94heavy@gmail.com |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
The following C++ file fails to build with GCC 6:
#include <cmath>
#include <iostream>
int main(int argc, char *argv[])
{
double num = 0.0;
std::cout << std::isnan(num) << "\n";
return 0;
}
This throws the following compile time error:
> test.cpp: In function ���int main(int, char**)���:
> test.cpp:7:16: error: ���__builtin_isnan��� is not a member of ���std���
> std::cout << std::isnan(num) << "\n";
> ^~~
> test.cpp:7:16: note: suggested alternative:
> <built-in>: note: ���__builtin_isnan���
Is that meant to happen? It builds properly with GCC 7.
Build command: g++-6 -O2 -Wall -g test.cpp