This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/36231] ostream includes unistd.h outside namespace std, polluting
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2010 14:42:11 -0000
- Subject: [Bug libstdc++/36231] ostream includes unistd.h outside namespace std, polluting
- References: <bug-36231-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from joseph at codesourcery dot com 2010-04-30 14:42 -------
Subject: Re: ostream includes unistd.h outside namespace
std, polluting
On Fri, 30 Apr 2010, igodard at pacbell dot net wrote:
> namespace that has not been opened by "using". My report says that gcc violates
> that standard, because it gratuitously dumps POSIX names into my global space.
It does more than that - for C++ it defines _GNU_SOURCE and so causes many
non-standard names to be defined as well.
Fixing this requires cooperation from libc maintainers to provide
implementation-namespace versions of whatever functions libstdc++ wishes
to use from its headers that are not included in strict ISO C90+AMD1, and
I doubt such cooperation will be forthcoming.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36231