This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/36231] ostream includes unistd.h outside namespace std, polluting



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]