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++/51749] Including <algorithm> pollutes global namespace


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


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