This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11211] trivial static initializers of const objects should be done at compile time
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2003 13:46:24 -0000
- Subject: [Bug c++/11211] trivial static initializers of const objects should be done at compile time
- References: <20030616164300.11211.pinskia@physics.uc.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11211
------- Additional Comments From bangerth@dealii.org 2003-06-17 13:46 -------
JFYI, the standard indeed gives no provisions as to which constructors
from which translation unit are run first, but gcc can guarantee this
nevertheless on some systems using priority attributes on variables.
However, since nothing is known about which priorities are used in
other translation units, this is nothing we can use for optimization
here. I personally think that this proposed optimization would
apply to too few variables that it would be worth it. But that's just
my opinion.
W.