[Bug c++/11211] trivial static initializers of const objects should be done at compile time

bangerth@dealii.org gcc-bugzilla@gcc.gnu.org
Tue Jun 17 13:46:00 GMT 2003


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.



More information about the Gcc-bugs mailing list