bits/mathcalls.h causes declarations in global namespace in C++
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Compiling a C++ program that only included standard headers should never
define or declare anything outside of namespace std.
However, try to compile this:
#include <cmath>
int y0;
>g++ junk.cc
junk.cc:3:5: error: ‘int y0’ redeclared as different kind of symbol
int y0;
^
In file included from /usr/include/
/usr/include/
__MATHCALL (y0,, (_Mdouble_));
^
The file in question defines a lot (which is supposedly on purpose for the C language with GNU extension),
which is shouldn't do that when compiling a C++ program.