Thread View: gnu.g++.bug
1 messages
1 total messages
Started by rfg
Sun, 17 Dec 1989 20:08
bug 12178902 (1.36.1) - initialization of global reference objects
Author: rfg
Date: Sun, 17 Dec 1989 20:08
Date: Sun, 17 Dec 1989 20:08
26 lines
1529 bytes
1529 bytes
// bug 12178902 (1.36.1) - linkage of initialized global reference objects // If a global reference object is initialized, g++ (1.36.1) generates // code such that (a) space is allocated for the reference object in the // bss segment (rather than the data segment) and (b) the initialization // is done at run-time (rather than at compile-time). // This has two negative consequences. // First, if there are multiple initializations of any single global // reference object in various files (that will later be linked together) // then the linker is unable to catch this `multiple-initialization' // error. // Second, it would be more efficient to have the initialization done at // compile time. // Note that space for other types of global initialized objects (such as // class & struct objects, basic type objects, and pointer type objects) // *is* allocated (and initialized) in the data segment (rather than in // the bss segment). Thus, multiple initialization of these other types of // objects (in various files) can be detected by the linker. int i; int &ir = i;
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads