This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13207] New: <iostream> header and _XOPEN_SOURCE=500
- From: "rdesai at legato dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2003 20:48:27 -0000
- Subject: [Bug libstdc++/13207] New: <iostream> header and _XOPEN_SOURCE=500
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On an alpha (OSF1) V5.1 system, when I try to compile a C++ source that
includes the STL <iostream> header, if I define -D_XOPEN_SOURCE=500 (or
anything greater than or equal to 420, for that matter), I get the following
errors:
In file included
from /opt/TWWfsw/gcc332/include/c++/3.3.2/bits/locale_facets.tc
c:41,
from /opt/TWWfsw/gcc332/include/c++/3.3.2/locale:47,
from /opt/TWWfsw/gcc332/include/c++/3.3.2/bits/ostream.tcc:37,
from /opt/TWWfsw/gcc332/include/c++/3.3.2/ostream:535,
from /opt/TWWfsw/gcc332/include/c++/3.3.2/iostream:45,
from x.cpp:3:
/opt/TWWfsw/gcc332/include/c++/3.3.2/cmath: In function `long double
std::acos(long double)':
/opt/TWWfsw/gcc332/include/c++/3.3.2/cmath:194: error: `::acosl' undeclared
(first use here)
Which is followed by many additional lines with "long double" math functions.
The reason that _XOPEN_SOURCE >= 420 triggers it, is that this causes
standards.h to automatically set _XOPEN_SOURCE_EXTENDED, which in turn causes
math.h not to define the "long double" math functions.
So I am not sure if the problem is in math.h, for not defining the functions
or in cmath for not dealing with it properly. Regardless, setting
_XOPEN_SOURCE=420 or higher should not cause the STL to not compile.
--
Summary: <iostream> header and _XOPEN_SOURCE=500
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rdesai at legato dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev56-dec-osf5.1
GCC host triplet: alphaev56-dec-osf5.1
GCC target triplet: alphaev56-dec-osf5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13207