From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10692 invoked by alias); 30 Apr 2010 14:24:30 -0000 Received: (qmail 10622 invoked by uid 48); 30 Apr 2010 14:24:17 -0000 Date: Fri, 30 Apr 2010 14:24:00 -0000 Message-ID: <20100430142417.10621.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: "igodard at pacbell dot net" 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/msg03355.txt.bz2 ------- Comment #9 from igodard at pacbell dot net 2010-04-30 14:24 ------- This is not a fault of POSIX, because I'm *not* using POSIX. I'm using C++ ostream. Because I'm not using POSIX I expect to be able to declare (for example) "int open = 0;" without a problem - "open" is not a reserved key word and I'm not #including anything that is *defined* to transitively include a POSIX header. According to my reading of the standard, all standard libraries must export only the names defined by the standard, and any other names they need must be guarded by leading underscores or be within a similarly guarded 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. Of course, I may be wrong in my interpretation of the standard - I have been many times before :-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36231