This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51749] Including <algorithm> pollutes global namespace
- From: "nospam.kotarou.dono at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 04:40:07 +0000
- Subject: [Bug libstdc++/51749] Including <algorithm> pollutes global namespace
- Auto-submitted: auto-generated
- References: <bug-51749-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51749
--- Comment #14 from nospam.kotarou.dono at gmail dot com 2012-01-29 04:40:07 UTC ---
Just reporting another one~ (Yes, I can live with it not being fixed, but
bugzilla is for reporting bugs, right?)
Including <string> eventually includes pthreads.h, dumping the whole file in
the global namespace. Example:
$ cat | g++ -xc++ - -o - > /dev/null
#include <string>
pid_t pid = 0; // Should not compile
int main() { return (short)pid; }
$ echo $?
0