Bug 68984 - error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
Summary: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
Status: RESOLVED DUPLICATE of bug 48891
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2015-12-18 15:10 UTC by Markus Trippelsdorf
Modified: 2016-01-07 13:16 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-01-06 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2015-12-18 15:10:44 UTC
markus@x4 tmp % cat isinf.cpp
#include <cmath>
using std::isinf;

markus@x4 tmp % g++ -std=c++11 -c isinf.cpp
isinf.cpp:2:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
 using std::isinf;
            ^~~~~

In file included from /usr/include/features.h:368:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/g++-v6/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/g++-v6/x86_64-pc-linux-gnu/bits/c++config.h:493,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/g++-v6/cmath:41,
                 from isinf.cpp:1:
/usr/include/bits/mathcalls.h:201:1: note: previous declaration ‘int isinf(double)’
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^

markus@x4 tmp % clang++ -stdlib=libc++ -std=c++11 -c isinf.cpp
markus@x4 tmp %
Comment 1 Marc Glisse 2016-01-06 13:43:40 UTC
This is really a dup of PR60407, PR48891, but it is true that the error message looks a bit different when you write things this way.
Comment 2 Jonathan Wakely 2016-01-07 13:16:15 UTC
Let's deal with this under 48891 then

*** This bug has been marked as a duplicate of bug 48891 ***