[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread redi at gcc dot gnu dot org
--- Comment #8 from redi at gcc dot gnu dot org 2010-07-15 17:49 --- (In reply to comment #7) > Hehe, I am really not C++ guy even in 2010, but I have impression that people > are including iostream without really thinking about consequences here. Yes, and in many cases that's the simpl

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread hubicka at gcc dot gnu dot org
--- Comment #7 from hubicka at gcc dot gnu dot org 2010-07-15 16:53 --- Hehe, I am really not C++ guy even in 2010, but I have impression that people are including iostream without really thinking about consequences here. Well, so what we can do about the startup times then? I will tea

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread redi at gcc dot gnu dot org
--- Comment #6 from redi at gcc dot gnu dot org 2010-07-15 16:45 --- and please ... it's 2010, not ;-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44952

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2010-07-15 16:38 --- This is why you should only include if you want actually want std::cin, std::cout or std::cerr (or the wide character equivalents.) Otherwise you should only include one or more of , and , as needed. (In reply to co

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2010-07-15 16:30 --- (In reply to comment #2) > Why's this not in libstdc++.so .init? because this will not work if libstdc++ is a static library. Take: #include namespace { struct g { g(){ std::cout << "t"; } }; g one; } --- CUT

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread hubicka at gcc dot gnu dot org
--- Comment #3 from hubicka at gcc dot gnu dot org 2010-07-15 16:12 --- ... and are we required to emit the constructor even if we know var is not used? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44952

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-07-15 16:03 --- Why's this not in libstdc++.so .init? -- rguenth at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug libstdc++/44952] #include imply global constructor.

2010-07-15 Thread pinskia at gmail dot com
--- Comment #1 from pinskia at gmail dot com 2010-07-15 16:02 --- Subject: Re: New: #include imply global constructor. This is expected and iirc required by the c++ standard too. On Jul 15, 2010, at 8:51 AM, "hubicka at gcc dot gnu dot org" wrote: > Noticed while reading > http://