This is the mail archive of the gcc-help@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]

Re: having multiple copies of _GLOBAL__sub_I__xxxx which are calling std::ios_base::Init::Init()@GLIBCXX_3.4


On Tue, 10 Jul 2018 at 12:29, Klaus Rudolph <lts-rudolph@gmx.de> wrote:
>
> I see that gcc emits for every function which uses cout a global constructor call is emitted, even if the function is removed later during link stage.

I don't think it's true that it does it for every function. It does it
once per translation unit, not once per function. Your test is
misleading because you only have one function per TU.


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