Re: Feedback needed, especially non-Linux
David Fang <[email protected]>
| Newsgroups | gmane.comp.gnu.gnucap.devel |
|---|---|
| Message-ID | <[email protected]> |
> I'm not well-versed in the source, but are you depending on ordering of > static globals somehow? Al, Ok, it didn't take long to find various comments about link ordering: src/Makefile.am, globals.cc, etc... :) Link-ordering and global initialization ordering between translation units are not related; you cannot depend on link ordering to influence the other. When it happens to work, consider yourself lucky! I'd advise wrapping access to global variables/structures through some init-once interface, like a function, rather than relying on ordering. If you need to be precise about global object lifetime, consider using a reference-count pointer to manage orderly destruction. Does this help? David Fang Computer Systems Laboratory Electrical & Computer Engineering Cornell University http://www.csl.cornell.edu/~fang/ -- (2400 baud? Netscape 3.0?? lynx??? No problem!)