http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54791
--- Comment #8 from Adi <adivilceanu at yahoo dot com> 2012-11-03 19:14:41 UTC --- Thank you for your response. (Sorry for the repeated emails. I did it because I got delivery failures on the first 4 mails.) So just to be 100% sure on this: If I want to be sure all my constructors are called I should not have any of them inlined. Correct ? What about if I have a constructor body/implementation inside a class declaration ? Does the compiler inline that as well? I guess it might. So how do you see this case. Is it not a bug? I mean I am expecting my constructors to be called and they are not. Do you know a easy way to solve this without modifying all my constructors ? (any compiler options perhaps, ..using __attribute__((constructor)) ) ? PS: If I want to send you an attachment in a mail what format should it be ? txt, doc ? I got some delivery failures,... that's why I am asking. ________________________________ From: dje at gcc dot gnu.org <gcc-bugzi...@gcc.gnu.org> To: adivilce...@yahoo.com Sent: Saturday, November 3, 2012 3:48 PM Subject: [Bug target/54791] AIX-only: Constructors are not called in main program. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54791 --- Comment #7 from David Edelsohn <dje at gcc dot gnu.org> 2012-11-03 13:48:46 UTC --- The New York area has experienced a major natural disaster. I am located near NYC. GCC support is provided by volunteers. Repeatedly resending your message will not elicit a faster response. AIX uses the XCOFF file format, not ELF. The object files do not contain .ctor or .init sections to define constructors. The GCC collect2 wrapper scans object files for constructors and creates a function to call them. If the constructors are inlined, the symbols might not appear when the object files are scanned, preventing them from being included in the list of constructors to call.