From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25051 invoked by alias); 30 Apr 2010 09:51:53 -0000 Received: (qmail 24382 invoked by uid 48); 30 Apr 2010 09:51:27 -0000 Date: Fri, 30 Apr 2010 09:51:00 -0000 Message-ID: <20100430095126.24381.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/36231] ostream includes unistd.h outside namespace std, polluting In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "redi at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg03328.txt.bz2 ------- Comment #8 from redi at gcc dot gnu dot org 2010-04-30 09:51 ------- > I guess I'm still not being clear. I'm not using *any* of those names; I'm not If you're not using the names why do you care? > using C; I'm not using POSIX. I'm only using ostream, which is a plain old C++ > library, but when I include I'm getting C library functions like > open() - not C++ open, C open() - added to my global space, where they conflict > with application identifiers. There is not "C++ open", and you're on a POSIX platform, so there are POSIX interfaces defined, which yes, are defined in terms of C functions. But how do they conflict with application identifiers if you're not using the names? > Including a C++ include file should not cause any identifiers from the C or > POSIX to be gratuitously added to the the user's global space. This is a bug. > > Please check with your colleagues if you still do not understand the problem. I understand it, but I'm not going to fix it. > Andrew says 4.3 has fixed this; if so it can be closed FIXED, if verified. But > closing it WONTFIX is wrong. No, he suggested you /try/ 4.3, as it has some reductions in header dependencies, "fixes LIKE this". As it's not fixed, FIXED is wrong. I agree the situation isn't ideal, so it's not INVALID, but as I don't plan to do anything about it, WONTFIX seems appropriate. Check with http://gcc.gnu.org/bugzilla/page.cgi?id=fields.html#resolution if you still don't understand the words. You could consider sending a request to the POSIX C++ working group, requesting that POSIX interfaces do not pollute the global namespace when used by C++ programs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36231