public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44638] New: Inline constructors into static initializers
@ 2010-06-22 18:43 tglek at mozilla dot com
2010-06-27 22:10 ` [Bug c++/44638] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: tglek at mozilla dot com @ 2010-06-22 18:43 UTC (permalink / raw)
To: gcc-bugs
struct Derived {
Derived(int i):i(i){}
int i;
};
Derived d(3);
Generates a constructor function to call Derived() constructor. Would be nice
if this was inlined into a static initializer, ie the declaration would become
Derived d = {3}.
This is useful where Derived has a vtable, so one can't use POD-initialization.
When Derived d is a global variable, this causes a .ctors entry for it which
slows down app startup.
--
Summary: Inline constructors into static initializers
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tglek at mozilla dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44638
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/44638] Inline constructors into static initializers
2010-06-22 18:43 [Bug c++/44638] New: Inline constructors into static initializers tglek at mozilla dot com
@ 2010-06-27 22:10 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-27 22:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2010-06-27 22:09 -------
*** This bug has been marked as a duplicate of 4131 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44638
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-27 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-22 18:43 [Bug c++/44638] New: Inline constructors into static initializers tglek at mozilla dot com
2010-06-27 22:10 ` [Bug c++/44638] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).