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]

Re: [Bug libstdc++/44952] New: #include <iostream.h> 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" <gcc-bugzilla@gcc.gnu.org > wrote:

Noticed while reading
http://comments.gmane.org/gmane.comp.web.chromium.devel/16789

evans:/abuild/jh/trunk-install/bin/:[0]# more g.C
#include <iostream>
evans:/abuild/jh/trunk-install/bin/:[0]# ./g++  -O2 g.C -S
evans:/abuild/jh/trunk-install/bin/:[0]# more g.s
       .file   "g.C"
       .text
       .p2align 4,,15
       .type   _GLOBAL__I_g.C, @function
_GLOBAL__I_g.C:
.LFB969:
       .cfi_startproc
       subq    $8, %rsp
       .cfi_def_cfa_offset 16
       movl    $_ZStL8__ioinit, %edi
       call    _ZNSt8ios_base4InitC1Ev
       movl    $__dso_handle, %edx
       movl    $_ZStL8__ioinit, %esi
       movl    $_ZNSt8ios_base4InitD1Ev, %edi
       addq    $8, %rsp
       .cfi_def_cfa_offset 8
       jmp     __cxa_atexit
       .cfi_endproc
.LFE969:


-- Summary: #include <iostream.h> imply global constructor. Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hubicka at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44952




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